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

Improving output #60

Closed
sobolevn opened this issue Sep 12, 2018 · 0 comments · Fixed by #61
Closed

Improving output #60

sobolevn opened this issue Sep 12, 2018 · 0 comments · Fixed by #61

Comments

@sobolevn
Copy link
Contributor

Hi, I am trying to use this plugin instead of pytest-isort.
For me looks more logical to use a flake8 plugin to check imports rather than a plugin for your test runner.

But, I am finding one issue with flake8-isort. Its output is not as good as pytest-isort:

_________________________________ isort-check __________________________________
ERROR: /Users/sobolev/Documents/github/wemake-python-styleguide/wemake_python_styleguide/checker.py Imports are incorrectly sorted.

 
 from ast import Module
 from typing import Generator
+
 from flake8.options.manager import OptionManager
 
 from wemake_python_styleguide import constants
 from wemake_python_styleguide.options.config import Configuration
 from wemake_python_styleguide.types import (
+    CheckerSequence,
     CheckResult,
-    CheckerSequence,
     ConfigurationOptions,
 )
+from wemake_python_styleguide.version import version
 from wemake_python_styleguide.visitors.ast.complexity.counts import (
     MethodMembersVisitor,
     ModuleMembersVisitor,
 )
-from wemake_python_styleguide.version import version
 from wemake_python_styleguide.visitors.ast.complexity.function import (
     FunctionComplexityVisitor,
 )

Versus an output from flake8-isort:

/Users/sobolev/Documents/github/wemake-python-styleguide/wemake_python_styleguide/checker.py:5:1: I003 isort expected 1 blank line in imports, found 0
/Users/sobolev/Documents/github/wemake-python-styleguide/wemake_python_styleguide/checker.py:11:1: I001 isort found an import in the wrong position
/Users/sobolev/Documents/github/wemake-python-styleguide/wemake_python_styleguide/checker.py:18:1: I001 isort found an import in the wrong position

The first one shows the direct problem, while the second one just shows the line number of the incorrect import.

Thanks!

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 a pull request may close this issue.

1 participant