-
Notifications
You must be signed in to change notification settings - Fork 14
/
nitpick-style.toml
182 lines (151 loc) · 4.14 KB
/
nitpick-style.toml
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
[nitpick.styles]
include = [
'py://nitpick/resources/any/pre-commit-hooks',
]
[".editorconfig"]
root = true
[".editorconfig"."*"]
charset = 'utf-8'
end_of_line = 'lf'
indent_size = 4
indent_style = 'space'
insert_final_newline = true
trim_trailing_whitespace = true
[".editorconfig"."*.{bat,cmd,ps1}"]
end_of_line = 'crlf'
[".editorconfig"."*.{js,json,json5,yml,yaml,md,rb}"]
indent_size = 2
[".editorconfig".Makefile]
indent_style = 'tab'
[".flake8".flake8]
# Print the total number of errors:
count = true
# https://wemake-python-stylegui.de/en/latest/pages/usage/formatter.html
format = 'wemake'
# Let's not overcomplicate the code:
max-complexity = 10
# Accessibility/large fonts and PEP8 friendly.
# This is being flexibly extended through the `flake8-length`:
max-line-length = 79
# Count the number of occurrences of each error/warning code and print a report:
statistics = true
# ## Plugin-provided settings: ##
# flake8-eradicate
# E800:
eradicate-whitelist-extend = 'isort:\s+\w+|Ref:\s+https?:\/\/'
# 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'
# PT023:
pytest-mark-no-parentheses = true
# wemake-python-styleguide
show-source = true
[".isort.cfg".settings]
combine_as_imports = true
default_section = 'THIRDPARTY'
honor_noqa = true
include_trailing_comma = true
indent = 4
known_frameworks = 'awx, django'
known_platforms = 'awx_plugins.interfaces'
known_testing = 'hypothesis, pytest'
line_length = 79
lines_after_imports = 2
# https://pycqa.github.io/isort/#multi-line-output-modes
multi_line_output = 3
no_lines_before = 'LOCALFOLDER'
sections = 'FUTURE, STDLIB, TESTING, FRAMEWORKS, PLATFORMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER'
use_parentheses = true
verbose = true
[".mypy.ini".mypy]
color_output = true
error_summary = true
check_untyped_defs = true
disallow_any_explicit = true
disallow_any_expr = true # crashes with some decorators like `@functools.cache` and `@pytest.mark.parametrize`
disallow_any_decorated = true # fails on `@hypothesis.given()`
disallow_any_generics = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
enable_error_code = "\nignore-without-code"
extra_checks = true
follow_imports = 'normal'
local_partial_types = true
mypy_path = "${MYPY_CONFIG_FILE_DIR}/src:${MYPY_CONFIG_FILE_DIR}/_type_stubs"
no_implicit_reexport = true
pretty = true
show_column_numbers = true
show_error_code_links = true
show_error_codes = true
show_error_context = true
show_error_end = true
# `strict` will pick up any future strictness-related settings:
strict = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
# [nitpick.files.".mypy.ini"]
# comma_separated_values = [
# 'mypy.enable_error_code',
# ]
[".pylintrc.toml".tool.pylint.format]
max-line-length = 79
[".pylintrc.toml".tool.pylint.main]
init-hook = """
import os, pathlib, sys
repo_root_path = pathlib.Path.cwd()
src_path = repo_root_path / 'src'
sys.path[:0] = [str(src_path if src_path.exists() else repo_root_path)]
os.environ['PYTHONPATH'] = sys.path[0]
"""
[".codecov.yml".codecov]
require_ci_to_pass = false
[".codecov.yml".codecov.notify]
wait_for_ci = false
[".codecov.yml".codecov.notify.after_n_builds]
[".codecov.yml".codecov.token]
[".codecov.yml".comment]
require_changes = true
[".codecov.yml".coverage]
range = '100..100'
[".codecov.yml".coverage.status.patch.default]
target = '100%'
[".codecov.yml".coverage.status.patch.pytest]
flags = [
'pytest',
]
target = '100%'
[".codecov.yml".coverage.status.patch.typing]
flags = [
'MyPy',
]
[".codecov.yml".coverage.status.project.default]
target = '100%'
[".codecov.yml".coverage.status.project.lib]
flags = [
'pytest',
]
target = '100%'
[".codecov.yml".coverage.status.project.tests]
flags = [
'pytest',
]
target = '100%'
[".codecov.yml".coverage.status.project.typing]
flags = [
'MyPy',
]
target = '100%'