-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathpyproject.toml
189 lines (172 loc) · 6.4 KB
/
pyproject.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
183
184
185
186
187
188
189
[build-system]
build-backend = "poetry.core.masonry.api"
# https://github.com/python-poetry/poetry/issues/1993
requires = ["poetry-core>=1.0.8"]
[tool.black]
line-length = 120
[tool.nitpick]
# Use the default style and override some things (like the Python version)
style = [
"nitpick-style",
"py://nitpick/resources/python/38.toml",
]
[tool.poetry]
authors = ["W. Augusto Andreoli <andreoliwa@gmail.com>"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Plugins",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Unix",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
]
description = "Enforce the same settings across multiple language-independent projects"
keywords = ["flake8", "linter", "python3", "styleguide"]
license = "MIT"
name = "nitpick"
readme = "README.rst"
repository = "https://github.com/andreoliwa/nitpick"
version = "0.35.0"
[tool.poetry.dependencies]
attrs = ">=20.1.0" # attr.define introduced in this version
autorepr = "*"
click = "*"
ConfigUpdater = "*"
dictdiffer = "*"
dpath = "*"
# TODO: build: upgrading importlib-metadata to 4.10.1 downgrades the following packages:
# • Updating importlib-metadata (4.2.0 -> 4.10.1)
# • Updating pycodestyle (2.8.0 -> 2.7.0)
# • Updating pyflakes (2.4.0 -> 2.3.1)
# • Updating flake8 (4.0.1 -> 3.9.2)
flake8 = ">=3.0.0"
flatten-dict = "*"
freezegun = {optional = true, version = "*"}
furl = "*"
gitignore_parser = "*"
identify = "*"
importlib-resources = {python = ">=3.8, <3.9", version = "*"}
jmespath = "*"
loguru = "*"
# Pin marshmallow to avoid error on "pip install -U nitpick":
# marshmallow-polyfield 5.7 has requirement marshmallow>=3.0.0b10, but you'll have marshmallow 2.19.5 which is incompatible.
marshmallow = {version = ">=3.0.0b10"}
# Pin to avoid error on "flake8 ." when there is an invalid TOML style:
# TypeError: _deserialize() got an unexpected keyword argument 'partial'
marshmallow-polyfield = "^5.10"
"more-itertools" = "*"
packaging = "*"
pluggy = "*"
# TODO: chore: move to dependency groups once the feature is on a stable version of Poetry
# https://python-poetry.org/docs/master/managing-dependencies/#dependency-groups
# Group: lint
pylint = {optional = true, version = "*"}
# Group: test
pytest = {optional = true, version = "*"}
pytest-cov = {optional = true, version = "*"}
pytest-datadir = {optional = true, version = "*"}
pytest-socket = "*"
pytest-testmon = {optional = true, version = "*"}
pytest-watch = {optional = true, version = "*"}
python = "^3.8"
python-slugify = "*"
requests = "*"
requests-cache = ">=1.0.0" # This version uses requests_cache.policy.expiration
responses = {optional = true, version = "*"}
"ruamel.yaml" = "*"
sortedcontainers = "*"
# Group: doc
sphinx = {optional = true, version = "*"}
sphinx-gitref = {optional = true, version = "*"}
sphinx_rtd_theme = {optional = true, version = "*"}
sphobjinv = {optional = true, version = "*"}
StrEnum = "*"
testfixtures = {optional = true, version = "*"}
toml = "*" # TODO: refactor: use only tomlkit and remove uiri/toml
tomlkit = ">=0.8.0" # SingleKey() class introduced in this version
[tool.poetry.dev-dependencies]
icecream = "*"
ipython = "*"
pudb = "*"
[tool.poetry.extras]
doc = ["sphinx", "sphinx-gitref", "sphinx_rtd_theme", "sphobjinv"]
lint = ["pylint"]
test = ["freezegun", "pytest", "pytest-cov", "pytest-datadir", "pytest-socket", "pytest-testmon", "pytest-watch", "responses", "testfixtures"]
[tool.poetry.plugins."flake8.extension"]
NIP = "nitpick.flake8:NitpickFlake8Extension"
[tool.poetry.plugins.nitpick]
ini = "nitpick.plugins.ini"
json = "nitpick.plugins.json"
text = "nitpick.plugins.text"
toml = "nitpick.plugins.toml"
yaml = "nitpick.plugins.yaml"
[tool.poetry.scripts]
nitpick = "nitpick.__main__:main"
[tool.poetry.urls]
"Changelog" = "https://github.com/andreoliwa/nitpick/blob/develop/CHANGELOG.md"
"Documentation" = "https://nitpick.rtfd.io/"
"Issue Tracker" = "https://github.com/andreoliwa/nitpick/issues"
[tool.ruff]
# https://docs.astral.sh/ruff/settings/#line-length
line-length = 120
# https://docs.astral.sh/ruff/settings/#src
src = ["src"]
# https://docs.astral.sh/ruff/settings/#target-version
target-version = "py38"
[tool.ruff.format]
# https://docs.astral.sh/ruff/settings/#format_skip-magic-trailing-comma
skip-magic-trailing-comma = true
[tool.ruff.lint]
# https://docs.astral.sh/ruff/settings/#ignore
ignore = [
"ANN", # https://beta.ruff.rs/docs/rules/#flake8-annotations-ann # TODO: fix: add typing annotations (fix 249 errors and remove this ignore)
"COM", # https://beta.ruff.rs/docs/rules/#flake8-commas-com
"D107", # Missing docstring in `__init__`
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line of docstring should be in imperative mood
"E402", # Module level import not at top of file
"E501", # Line too long
"FBT", # https://beta.ruff.rs/docs/rules/#flake8-boolean-trap-fbt
"FIX002", # Line contains TO-DO, consider resolving the issue
"TD002", # Missing author in TO DO
"TD003", # Missing issue link on the line following this TO DO
]
# https://docs.astral.sh/ruff/settings/#select
select = ["ALL"]
# https://beta.ruff.rs/docs/rules/#flake8-quotes-q
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
# https://beta.ruff.rs/docs/rules/#mccabe-c90
[tool.ruff.lint.mccabe]
# https://docs.astral.sh/ruff/settings/#max-complexity
max-complexity = 10
# https://docs.astral.sh/ruff/settings/#per-file-ignores
[tool.ruff.lint.per-file-ignores]
# keep-sorted start
# ANN https://beta.ruff.rs/docs/rules/#flake8-annotations-ann
# F401 imported but unused
# ERA https://beta.ruff.rs/docs/rules/#eradicate-era
# INP001 File `xxx.py` is part of an implicit namespace package. Add an `__init__.py`.
# PLR0913 Too many arguments to function call
# S101 use of assert detected
# S105 Possible hardcoded password
# T201 `print` found
# T203 `pprint` found
# keep-sorted end
"compat.py" = ["F401"]
"docs/**" = ["ANN", "INP001", "T201", "T203"]
"docs/conf.py" = ["ERA"]
"docs/ideas/lab.py" = ["ERA"]
"src/nitpick/blender.py" = ["ERA"]
"tasks.py" = ["ANN", "PLR0913", "T201", "T203"]
"tests/**" = ["ANN", "PLR0913", "S101", "S105", "T201", "T203"]
"tests/data/**" = ["INP001"]
# https://github.com/pappasam/toml-sort
[tool.tomlsort]
all = true
ignore_case = true
in_place = true
trailing_comma_inline_array = true