Skip to content

Commit 1f7a0c4

Browse files
authored
⚙️ update flake8 configuration with useful links, comments
- added directory exclusion commands - added links to documentation for more information - ignores are separated in multiple lines with preceding comments
1 parent 9804842 commit 1f7a0c4

1 file changed

Lines changed: 26 additions & 10 deletions

File tree

.flake8

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1+
# Package uses Flake8 for Code Linting, Check Workflow for information
2+
# docs: https://flake8.pycqa.org/en/latest/user/configuration.html
13
[flake8]
4+
# Exclude the directory to reduce .flake8 traverse
5+
exclue =
6+
# .git is for version control, no need to traverse
7+
.git,
8+
9+
# docs can also be safely ignored, check config.py for sphinx
10+
11+
# Typically for a package, per-files ignore is very useful
212
per-file-ignores =
3-
# add per line ignores, if required
13+
# F401 module imported but unused, useful for init time
414
# F403 '... import *' used; unable to detect undefined names
5-
pkg-name/__init__.py: F403
15+
pkg-name/__init__.py: F401, F403
16+
17+
# Recommended to restrict in 70 lines, but sometimes violoated,
18+
# due to long URLs which can be ignored by setting line length.
619
max-line-length = 88
720

8-
## the following definations can be ignored
9-
## make necessary changes, if required
10-
# E203 whitespace before ':'
11-
# > personal preference,
12-
# > also sometimes violated by black: https://github.com/psf/black
13-
# E221 multiple spaces before operator
14-
# E251 unexpected spaces around keyword / parameter equals
15-
ignore = E203, E221, E251
21+
# Ignore the following error/violation codes, for complete list
22+
# https://flake8.pycqa.org/en/latest/user/error-codes.html
23+
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
24+
ignore =
25+
# E203 : White Spaces before symbols, ignored personal preference
26+
# E203 is also violated by black: https://github.com/psf/black
27+
E203,
28+
# 221 multiple spaces before operator
29+
E221,
30+
# E251 unexpected spaces around keyword / parameter equals
31+
E251

0 commit comments

Comments
 (0)