forked from ansible/pylibssh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.flake8
104 lines (90 loc) · 3.06 KB
/
.flake8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[flake8]
# Don't even try to analyze these:
exclude =
# No need to traverse egg files
*.egg,
# No need to traverse egg info dir
*.egg-info,
# No need to traverse eggs directory
.eggs,
# No need to traverse our git directory
.git,
# GitHub configs
.github,
# Cache files of MyPy
.mypy_cache,
# Cache files of pytest
.pytest_cache,
# Temp dir of pytest-testmon
.tmontmp,
# Countless third-party libs in venvs
.tox,
# Occasional virtualenv dir
.venv
# VS Code
.vscode,
# There's no value in checking cache directories
__pycache__,
# Temporary build dir
build,
# This contains sdists and wheels of pylibsshext that we don't want to check
dist,
# Metadata of `pip wheel` cmd is autogenerated
pip-wheel-metadata,
filename =
# Normal Python files (default):
*.py,
# Cython files:
*.pyx
# https://wemake-python-stylegui.de/en/latest/pages/usage/formatter.html
format = wemake
# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
I # flake8-isort is drunk + we have isort integrated into pre-commit
WPS306 # "Found class without a base class: *" -- we have metaclass shims
WPS422 # "Found future import: *" -- we need these for multipython
# Let's not overcomplicate the code:
max-complexity = 10
# Accessibility/large fonts and PEP8 friendly:
#max-line-length = 79
# Accessibility/large fonts and PEP8 unfriendly:
max-line-length = 160
# Allow certain violations in certain files:
per-file-ignores =
# in-tree PEP517 build backend nees a lot of legit `noqa`s
# also E800 reports a lot of false-positives for legit
# tool-related comments:
bin/pep517_backend.py: E800, WPS402
# Sphinx builds aren't supposed to Python 2:
docs/conf.py: WPS305
# WPS305 is unnecessary because this extension is
# Python 3 only and so f-strings are allowed,
# WPS317/WPS318 enforces weird indents,
# WPS326 doesn't allow implicit string concat,
# E800 reports a lot of false-positives for legit
# tool-related comments:
docs/_ext/towncrier_draft_ext.py: E800, WPS305, WPS317, WPS318, WPS326
# The package has imports exposing private things to the public:
src/pylibsshext/__init__.py: WPS412
# Exclude errors that don't make sense for Cython
# Examples:
# * "E211 whitespace before '('" happening to "typedef int (*smth) ..."
# * "E226 missing whitespace around arithmetic operator"
src/pylibsshext/*.pxd: E211, E225, E226, E227, E999
src/pylibsshext/*.pyx: E225, E226, E227, E999
# There are multiple `assert`s (S101)
# and subprocesses (import – S404; call – S603) in tests;
# also, using fixtures looks like shadowing the outer scope (WPS442);
# and finally it's impossible to have <= members in tests (WPS202):
tests/**.py: S101, S404, S603, WPS202, WPS442
# flake8-pytest-style
# PT001:
pytest-fixture-no-parentheses = true
# PT006:
pytest-parametrize-names-type = tuple
# PT007:
pytest-parametrize-values-type = tuple
pytest-parametrize-values-row-type = tuple
# wemake-python-styleguide
show-source = true