Skip to content
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

Can't stop warnings coming from flake8 #69

Open
panwarnaveen9 opened this issue May 13, 2020 · 4 comments
Open

Can't stop warnings coming from flake8 #69

panwarnaveen9 opened this issue May 13, 2020 · 4 comments

Comments

@panwarnaveen9
Copy link

I am keep on getting this log with every check.. Can I stopped them ?

---------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:211 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:189 option --ignore-names: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:211 option --ignore-names: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:189 option --classmethod-decorators: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:211 option --classmethod-decorators: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:189 option --staticmethod-decorators: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:211 option --staticmethod-decorators: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
@panwarnaveen9
Copy link
Author

my pytest.ini

[pytest]
addopts = -p no:warnings

@GergelyKalmar
Copy link

I think this is a result of flake8 moving to argparse in this release: https://flake8.pycqa.org/en/latest/release-notes/3.8.0.html#a1-2020-04-24

Until pytest-flake8 fixes this you may pin your flake8 version to 3.7.9, that should make the warnings disappear for now.

@saper
Copy link

saper commented May 21, 2020

Indeed, adding this in my tox.ini did help for now:

[testenv]
deps = flake8==3.7.3

@BvB93
Copy link

BvB93 commented Jun 9, 2020

Silencing the warnings via conftest.py also does the trick: eisensheng/pytest-catchlog#59 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants