Created
January 8, 2019 20:50
-
-
Save AlexArcPy/d8da28d4ca95a381435f301323e639b1 to your computer and use it in GitHub Desktop.
Exploring flake8 api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def some(): | |
print() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flake8.api import legacy as flake8 | |
style_guide = flake8.get_style_guide() | |
style_guide.check_files([r"C:\Development\code_for_flake8_to_analyze.py"]) | |
checker = style_guide._file_checker_manager.checkers[0] | |
tokens = checker.processor.file_tokens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using wemakeservices linter | |
C:\Development\code_for_flake8_to_analyze.py:0:1: C101 Coding magic comment not found | |
C:\Development\code_for_flake8_to_analyze.py:1:1: Z110 Found wrong variable name "some" | |
C:\Development\code_for_flake8_to_analyze.py:1:1: D100 Missing docstring in public module | |
C:\Development\code_for_flake8_to_analyze.py:1:1: D103 Missing docstring in public function | |
C:\Development\code_for_flake8_to_analyze.py:2:1: I001 isort found an import in the wrong position | |
C:\Development\code_for_flake8_to_analyze.py:2:5: T001 print found. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment