-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use of standard flake8 configuration locations #22
Comments
Yes, that would be great. I need to configure the |
I think this might have been corrected with the (now merged) #21 ? |
I have my |
Maybe this is a separate story, but: When i put my pytest config in However my editor's linter (SublimeText 3 Flaske8Lint plugin, https://github.com/dreadatour/Flake8Lint/) doesn't recognize the pytest-specific
Because pytest-flake8 has its own variable names ( Did anyone else encounter this? |
@khink I'm seeing this too. The issue is less about what files are used, and more about what the configuration parameters are. It appears that all of the standard flake8 configuration settings are ignored when using I'm experiencing it with python 3.6, flake8==3.7.7 and pytest-flake8==1.0.4. If I put ignores in tox.ini or setup.cfg within a I would also support removing the plugin-specific parameters and just using the regular |
pytest-flake8 doesn't properly honor [flake8] configuration in tox.ini (See tholo/pytest-flake8#22), and, really, what do I need the plugin for?
It seems that pytest-flake8 is ignoring flake8's |
using native config is exactly what I would want to see! No test-specific overrides needed. |
Some further research. It looks like pytest-flake8 does use [flake8] settings, e.g |
OK, I have a V2 implementation of the plugin working (for n=1 project), and will soon be issuing a PR for it after I get some tests implemented.. In the meantime, you can install it from: https://github.com/bobhy/pytest-flake8, be sure to checkout branch use_flake8_config. It worked for me with flake8 v3.7 and v3.8, which broke the plugin api again. V2 deprecates --flake8-ignores, --flake8-max-line-length and friends and instead abides by flake8 config file, mostly. So review your flake8 config file before trying this. flake8 config drive this plugin with 2 exceptions:
|
According to the docs, flake8 can handle different locations of configuration: setup.cfg, tox.ini, or .flake8.
Sadly these config files are not considered by pytest-flake8 for some reason. Is there a reason or could this be fixed?
If it read the default locations, it would be possible to configure flake8 in one place and use that configuration for both cli invocation and via pytest.
The text was updated successfully, but these errors were encountered: