New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dynamic help #14543
Add dynamic help #14543
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is to make things like PythonToolBase
work?
|
||
|
||
def _eval_maybe_helpt(help: _HelpT, subsystem_cls: Any) -> str: | ||
return help(subsystem_cls) if inspect.isfunction(help) else help # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to use the MyPy error code: https://www.pantsbuild.org/v2.10/docs/style-guide#use-error-codes-in--type-ignore-comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remind me at some point to codify these conventions in a flake8 plugin ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those codes are underwhelming. It needs to be beefed up, and in-repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this in-repo would be great! That wasn't possible two years ago. But now that we have support for multiple resolves + in-source Flake8 plugins (thanksssss)
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Adding the ability to "delay" help evaluation until flag options are collected. This mirrors the old behavior and is necessary for "base" subsystems where the help is fully or partially defined in the subclass. [ci skip-rust] [ci skip-build-wheels]
(breakout from #14467)
Adding the ability to "delay" help evaluation until flag options are collected. This mirrors the old behavior and is necessary for "base" subsystems where the help is fully or partially defined in the subclass.
[ci skip-rust]