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

false positive for VagueImportViolation #WPS347 #1309

Closed
vikigenius opened this issue Apr 4, 2020 · 2 comments
Closed

false positive for VagueImportViolation #WPS347 #1309

vikigenius opened this issue Apr 4, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@vikigenius
Copy link

Let us say I have the following structure

root_module
  pipeline
    __init__.py
    read.py
    write.py

Let us say in write.py I try to import read.py like this

from root_module.pipeline import read as read_pipeline # VagueImportViolation

Shouldn't it be okay since I am using an alias

@vikigenius vikigenius added the bug Something isn't working label Apr 4, 2020
@vikigenius vikigenius changed the title false positive for VagueImportViolation false positive for VagueImportViolation #WPS347 Apr 4, 2020
@sobolevn
Copy link
Member

sobolevn commented Apr 4, 2020

Which version are you using? It is seemed to be fixed in 0.14

» echo 'from root_module.pipeline import read as read_pipeline # VagueImportViolation' > ex.py

» flake8 ex.py
WARNING:flake8.checker:The multiprocessing module is not available. Ignoring --jobs arguments.

ex.py

  1:1      F401  'root_module.pipeline.read as read_pipeline' imported but unused
  from root_module.pipeline import read as read_pipeline # VagueImportViolation
  ^

  1:1      I001  isort found an import in the wrong position
  from root_module.pipeline import read as read_pipeline # VagueImportViolation
  ^

  1:55     E261  at least two spaces before inline comment
  from root_module.pipeline import read as read_pipeline # VagueImportViolation
                                                        ^

Full list of violations and explanations:
https://wemake-python-stylegui.de/en/0.14.0/pages/usage/violations/

@vikigenius
Copy link
Author

@sobolevn You are right. Update to 14.0 fixed this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants