-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[py]: exclude *venv
directories from flake8
#10651
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #10651 +/- ##
=======================================
Coverage 45.60% 45.60%
=======================================
Files 86 86
Lines 5741 5741
Branches 274 274
=======================================
Hits 2618 2618
Misses 2849 2849
Partials 274 274 Continue to review full report at Codecov.
|
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.
Can you verify that what you have is supposed to work? (or why it didn't for me)
@@ -1,5 +1,5 @@ | |||
[flake8] | |||
exclude = .tox,docs/source/conf.py | |||
exclude = .tox,docs/source/conf.py,*venv |
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.
This didn't actually work for me. I think this did: ./venv
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.
has this been solved?
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.
I can't recreate this; where does your virtual env typically reside, can you share the full path? I tested it yesterday and couldn't break it
@titusfortner This landed in another piece of work of mine, if you come across issues using |
Invoking
tox
is a requirement currently and not something that bazel does; this means people need to typically make a virtualenv and installtox
in it to do this task; installingtox
globally is also possible but not -advised (but that won't encounter the problem this fixes if so).Common python practice would be:
python3.7 -m venv .venv
||python3.7 -m venv venv
( in the case of using 3.7 like selenium encourages)This excludes
*venv
so thattox -e flake8
does not take a long time to complete and flag up 200+ false positives by scanning files inside the virtual env.