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

Minor changes for #1065 and #1044 #1089

Merged
merged 5 commits into from
Mar 4, 2022

Conversation

LucyJimenez
Copy link
Contributor

@LucyJimenez LucyJimenez commented Mar 3, 2022

Closes #1065 #1044
Minor changes:

  • improve noqa message on asv/plugins/virtualenv.py
  • remove folder excluded for flake8: asv/plugins, asv/commands

asv/environment.py,
asv/machine.py,
asv/graph.py,
asv/extern,
asv/plugins,
asv/template/benchmarks,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we've got issues for everything that is pending. Can you check and make sure we've got issues to have the whole repo styles. Either by opening new issues, opening PRs for the parts without issues, or a mix. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -48,7 +48,7 @@ def __init__(self, conf, python, requirements, tagged_env_vars):
tagged_env_vars)

try:
import virtualenv # noqa F401 unused, but required in case the previous step does not work
import virtualenv # noqa F401 unused, but is needed even if not used
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you're saying here doesn't add much value. It's clearly needed if unsused, that's why we have the noqa. Would be more useful to explain why is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, Marc, I did not get the idea. Could you please clarify a little bit more?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has an import, which is unused. We don't want to have unused imports in general, there is no point. In this case we're going to leave it, and we're telling flake8 this is fine, we want to leave an unused import. That's fine, but let readers of this code know why we're leaving this import. And saying "because it's needed" it's like not saying anyting. Please add here a comment on why this import is needed. In this case it's quite obvious, and could not even be needed, but a short sentence to help readers would still be nice.

@LucyJimenez LucyJimenez changed the title Minor changes for #1065 and #1042 Minor changes for #1065 and #1044 Mar 3, 2022
setup.cfg Outdated
@@ -4,12 +4,11 @@ ignore =
W504, # W504: Line break occurred after a binary operator
E741 # E741: Do not use variables named 'I', 'O', or 'l'
exclude = setup.py,
asv/commands,
asv/benchmarks,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we reintroducing this to the excludes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it was a mistake.

@@ -48,7 +48,7 @@ def __init__(self, conf, python, requirements, tagged_env_vars):
tagged_env_vars)

try:
import virtualenv # noqa F401 unused, but required in case the previous step does not work
import virtualenv # noqa F401 unused, but required to manage an environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required to manage any environment. This import is just used to test whether virtualenv is installed or not, and its goal is to fail here with a useful error message (instead of elsewhere I guess) if the package is not installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you so much for the explanation!

@datapythonista datapythonista merged commit 6ed12ff into airspeed-velocity:master Mar 4, 2022
@datapythonista
Copy link
Member

Thanks @LucyJimenez

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

Successfully merging this pull request may close these issues.

Fix flake8 violations for all files in the asv/commands/ directory
2 participants