Skip to content

Conversation

@savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Dec 7, 2025

Based on #142274 (comment), the issue here is that format_help() eventually accesses self._theme but _theme was never set since _set_color() is no longer called in __init__. I think we can initialize _theme to a safe default (no color) so that direct instantiation works but the parser can still override it afterward.

@savannahostrowski
Copy link
Member Author

@hamdanal Mind also taking a look at this and making sure everything is fixed on your end?

Copy link
Contributor

@hamdanal hamdanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the problem. Thank you.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding a regression test?

@savannahostrowski savannahostrowski enabled auto-merge (squash) December 7, 2025 20:36
@savannahostrowski savannahostrowski merged commit dc9f238 into python:main Dec 7, 2025
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants