1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-17 15:35:45 +02:00
tldr/pages/common/flake8.md

21 lines
704 B
Markdown
Raw Normal View History

2021-08-05 17:14:47 -07:00
# flake8
> Check the style and quality of Python code.
2021-08-05 17:14:47 -07:00
> More information: <https://flake8.pycqa.org/>.
- Lint a file or directory recursively:
`flake8 {{path/to/file_or_directory}}`
- Lint a file or directory recursively and show the line on which each error occurred:
`flake8 --show-source {{path/to/file_or_directory}}`
2025-08-16 05:38:20 +03:00
- Lint a file or directory recursively and ignore a list of rules. (All available rules can be found at <https://www.flake8rules.com/>):
2021-08-05 17:14:47 -07:00
2025-08-16 05:38:20 +03:00
`flake8 --ignore {{rule1,rule2,...}} {{path/to/file_or_directory}}`
2021-08-05 17:14:47 -07:00
- Lint a file or directory recursively but exclude files matching the given globs or substrings:
`flake8 --exclude {{substring1,glob2}} {{path/to/file_or_directory}}`