forked from wemake-services/wemake-python-styleguide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
135 lines (111 loc) · 3.48 KB
/
setup.cfg
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# All configuration for plugins and other utils is defined here.
# Read more about `setup.cfg`:
# https://docs.python.org/3/distutils/configfile.html
# === Linter configuration ===
# You can reuse this configuration in your own projects.
# See: https://wemake-python-stylegui.de/en/latest/pages/usage/integrations/nitpick.html
[flake8]
# Base flake8 configuration:
# https://flake8.pycqa.org/en/latest/user/configuration.html
format = wemake
show-source = True
statistics = False
doctests = True
enable-extensions = G
# Plugins:
accept-encodings = utf-8
max-complexity = 6
max-line-length = 80
radon-max-cc = 10
radon-show-closures = True
radon-no-assert = True
# Self settings:
max-imports = 15
# Excluding some directories:
exclude =
.git
__pycache__
.venv
.eggs
*.egg
# These folders contain code badly written for reasons:
# Project spefic, do not copy.
tests/fixtures/**
tests/**/snapshots/**
# Exclude some pydoctest checks globally:
ignore = D100, D104, D401, W504, RST303, RST304, DAR103, DAR203
per-file-ignores =
# These function names are part of 3d party API:
wemake_python_styleguide/visitors/ast/*.py: N802
# These modules should contain a lot of classes:
wemake_python_styleguide/violations/*.py: WPS202
# This module should contain magic numbers:
wemake_python_styleguide/options/defaults.py: WPS432
# Checker has a lot of imports:
wemake_python_styleguide/checker.py: WPS201
# There are multiple fixtures, `assert`s, and subprocesses in tests:
tests/*.py: S101, S105, S404, S603, S607, WPS211, WPS226
# Docs can have the configuration they need:
docs/conf.py: WPS407
[isort]
# isort configuration:
# https://github.com/timothycrosley/isort/wiki/isort-Settings
include_trailing_comma = true
# See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 3
# Is the same as 80 in flake8:
line_length = 79
# We need these lines for Github Action to work correctly,
# **please** do not copy it to your own configs:
default_section = THIRDPARTY
known_first_party = wemake_python_styleguide*
skip_glob =
# These folders contain code badly written for reasons:
tests/fixtures/**
tests/**/snapshots/**
[darglint]
# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = long
# === Internal tools ===
# You are not interested in anything beyond this line.
[tool:pytest]
# py.test configuration: http://doc.pytest.org/en/latest/customize.html
norecursedirs = tests/fixtures *.egg .eggs dist build docs .tox .git __pycache__
filterwarnings =
ignore::DeprecationWarning
addopts =
--strict
--doctest-modules
--cov=wemake_python_styleguide
--cov-branch
--cov-report=term-missing:skip-covered
--cov-report=html
--cov-fail-under=100
[mypy]
# The mypy configurations: http://bit.ly/2zEl9WI
allow_redefinition = False
check_untyped_defs = True
disallow_untyped_decorators = True
disallow_any_explicit = True
disallow_any_generics = True
disallow_untyped_calls = True
ignore_errors = False
ignore_missing_imports = True
implicit_reexport = False
strict_optional = True
strict_equality = True
no_implicit_optional = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unreachable = True
warn_no_return = True
[mypy-wemake_python_styleguide.logic.safe_eval]
# We allow explicit `Any` only in this file, because that's what it does:
disallow_any_explicit = False
[doc8]
# doc8 configuration: https://pypi.org/project/doc8/
ignore-path = docs/_build
max-line-length = 80
sphinx = True