-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
option_manager.add_option ignores action when reading from config #1770
Comments
While we rely on argparse under our abstraction, we don't document support for actions. https://flake8.pycqa.org/en/latest/plugin-development/plugin-parameters.html#registering-options It wouldn't be easy to add support for that since we don't want to be tied too closely to any argument parsing backend. Beyond that, parsing config files is separate from CLI options. I don't even think argparse gives us a good way to trigger your action unfortunately |
hm, that's a shame. But if deemed not worth supporting you should maybe give a warning if both |
~generally you want to use |
We ran into this in Might be useful to warn and eventually error on passing |
the |
how did you install flake8?
pip install flake8
also when cloned from github master
unmodified output of
flake8 --bug-report
describe the problem
what I expected to happen
my argparse.Action to be called regardless of if the parameter is specified on the command line or in the config
sample code
I implemented a test that reproduces the error. The first one passes, the second one doesn't.
commands ran
The value is
foo
, which it would be if there's noaction
specified, but it completely sidesteps calling the action completely.The text was updated successfully, but these errors were encountered: