-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
195 lines (179 loc) · 6.23 KB
/
pyproject.toml
File metadata and controls
195 lines (179 loc) · 6.23 KB
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
190
191
192
193
194
195
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[dependency-groups]
dev = [
"icecream",
"ipython",
"pudb",
]
doc = [
"mkdocs-git-revision-date-localized-plugin>=1.5.0", # Show last update dates on pages
"mkdocs-linkcheck>=1.0.6", # Check for broken links in documentation
"mkdocs-macros-plugin>=1.5.0",
"mkdocs-material>=9.7.0", # Modern Material Design theme for MkDocs
"mkdocs-minify-plugin>=0.8.0", # Minify HTML/CSS/JS for faster page loads
"mkdocs-redirects>=1.2.2", # Handle URL redirects for backward compatibility
"mkdocstrings[python]>=0.30.1", # Auto-generate API docs from Python docstrings
"pymdown-extensions>=10.17.1", # Markdown extensions for code blocks, tabs, admonitions, etc.
"ruff", # Required by mkdocstrings for formatting signatures
]
lint = [
"pylint",
]
test = [
"freezegun>=1.5.2",
"pytest",
"pytest-cov",
"pytest-datadir",
"pytest-socket",
"pytest-testmon",
"pytest-watch",
"responses",
"testfixtures",
]
[project]
authors = [
{email = "andreoli@sent.com", name = "W. Augusto Andreoli"},
]
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",
]
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",
"furl",
"gitignore_parser",
"identify",
"jmespath",
"loguru",
# 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,<6.0",
# 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>=3.0.0b10",
"more-itertools",
"packaging",
"pluggy",
"pytest-socket",
"python-slugify",
"requests",
"requests-cache>=1.0.0", # This version uses requests_cache.policy.expiration
"ruamel-yaml-clib>=0.2.12",
"ruamel.yaml",
"sortedcontainers",
"StrEnum",
"toml", # TODO: refactor: use only tomlkit and remove uiri/toml
"tomlkit>=0.8.0", # SingleKey() class introduced in this version
]
description = "Enforce the same settings across multiple language-independent projects"
keywords = ["flake8", "linter", "python3", "styleguide"]
license = {text = "MIT"}
name = "nitpick"
readme = "README.md"
requires-python = ">=3.10"
version = "0.38.1"
[project.entry-points."flake8.extension"]
NIP = "nitpick.flake8:NitpickFlake8Extension"
[project.entry-points.nitpick]
ini = "nitpick.plugins.ini"
json = "nitpick.plugins.json"
text = "nitpick.plugins.text"
toml = "nitpick.plugins.toml"
yaml = "nitpick.plugins.yaml"
[project.scripts]
nitpick = "nitpick.__main__:main"
[project.urls]
Changelog = "https://github.com/andreoliwa/nitpick/blob/develop/CHANGELOG.md"
Documentation = "https://nitpick.rtfd.io/"
"Issue Tracker" = "https://github.com/andreoliwa/nitpick/issues"
Repository = "https://github.com/andreoliwa/nitpick"
[tool.black]
line-length = 120
[tool.nitpick]
# TODO: feat: default nitpick style should be "python-uv"; the previous preset should be renamed to "python-poetry"
# style = ["nitpick-style"]
style = ["python-no-poetry"]
[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 = "py310"
[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
"D212", # Multi-line docstring summary should start at the first line (Google style)
"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/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://docs.astral.sh/ruff/settings/#lint_pydocstyle_convention
[tool.ruff.lint.pydocstyle]
convention = "pep257"
# https://github.com/pappasam/toml-sort
[tool.tomlsort]
all = true
ignore_case = true
in_place = true
trailing_comma_inline_array = true