forked from rstcheck/rstcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
210 lines (185 loc) · 6.14 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "rstcheck"
version = "6.1.1"
description = "Checks syntax of reStructuredText and code blocks nested within it"
authors = ["Steven Myint <[email protected]>"]
maintainers = ["Christian Riedel <[email protected]>"]
license = "MIT"
repository = "https://github.com/rstcheck/rstcheck"
readme = "README.rst"
classifiers = ["Topic :: Software Development :: Quality Assurance"]
keywords = ["restructuredtext", "rst", "linter", "static-analysis"]
packages = [
{ include = "rstcheck", from = "src" },
{ include = "tests", format = "sdist" },
{ include = "AUTHORS.rst", format = "sdist" },
]
include = ["testing"]
[tool.poetry.scripts]
rstcheck = "rstcheck._cli:main"
[tool.poetry.dependencies]
python = "^3.7"
# EXTRA sphinx
sphinx = {version = "*", optional = true}
# EXTRA toml
tomli = { version = "*", optional = true }
# EXTRA testing
pytest = { version = ">=6.0", optional = true }
pytest-cov = {version = ">=3.0", optional = true}
coverage = {extras = ["toml"], version = ">=6.0", optional = true}
coverage-conditional-plugin = { version = ">=0.5", optional = true }
pytest-sugar = { version = ">=0.9.5", optional = true }
pytest-randomly = { version = ">=3.0", optional = true }
# EXTRA docs
sphinx-autobuild = { version = "2021.3.14", optional = true }
m2r2 = { version = ">=0.3.2", optional = true }
# TODO:#i# wait for fix: https://github.com/MrDogeBro/sphinx_rtd_dark_mode/issues/28
sphinx-rtd-theme = { version = "<1", optional = true }
sphinx-rtd-dark-mode = {version = "^1.2.4", optional = true}
sphinxcontrib-spelling = { version = ">=7.3", optional = true }
sphinx-click = "^4.0.3"
# MAIN DEPENDENCIES
rstcheck-core = "^1.0.2"
importlib-metadata = {version = ">=1.6, <5.0", python = "<3.8"}
typing-extensions = {version = ">=3.7.4, <5.0", python = "<3.8"}
typer = {extras = ["all"], version = ">=0.4.1,<0.8"}
[tool.poetry.dev-dependencies]
pre-commit = ">=2.17"
tox = ">=3.15"
my-flake8-plugins = { git = "https://github.com/cielquan/my-flake8-plugins.git", rev = "v1.5.0", extras= ["flakeheaven"]}
pylint = ">=2.12"
mypy = ">=0.931"
pytest = ">=6.0"
sphinx = ">=4.0"
sphinx-rtd-theme = "*"
[tool.poetry.extras]
sphinx = ["sphinx"]
toml = ["tomli"]
testing = [
"pytest",
"pytest-cov",
"coverage",
"coverage-conditional-plugin",
"pytest-sugar",
"pytest-randomly",
]
docs = [
"sphinx",
"sphinx-autobuild",
"m2r2",
"sphinx-rtd-theme",
"sphinx-rtd-dark-mode",
"sphinxcontrib-spelling",
"sphinx-click",
]
# -- BLACK CONFIG ---------------------------------------------------------------------
[tool.black]
line-length = 100
exclude = "venv/"
include = '\.pyi?$' # single quotes needed
# -- ISORT CONFIG ---------------------------------------------------------------------
[tool.isort]
profile = "black"
lines_after_imports = 2
combine_as_imports = true
skip_gitignore = true
# -- MYPY CONFIG ----------------------------------------------------------------------
[tool.mypy]
show_error_codes = true
strict_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
disallow_any_generics = true
check_untyped_defs = true
implicit_reexport = false
python_version = "3.10" # CHANGE ME
# -- FLAKEHEAVEN CONFIG ----------------------------------------------------------------
[tool.flakeheaven]
base = ["https://raw.githubusercontent.com/Cielquan/my-flake8-plugins/v1.5.0/flakeheaven-base.toml"]
min_python_version = "3.7" # CHANGE ME
[tool.flakeheaven.exceptions."examples"]
flake8-eradicate = ["-E800"]
# -- PYLINT CONFIG --------------------------------------------------------------------
[tool.pylint]
[tool.pylint.messages_control]
disable = [
# deactivate because double check
# https://github.com/PyCQA/pylint/issues/3512
"C0103", # invalid-name - [pep8-naming]
"C0113", # unneeded-not - F713[flake8]
"C0114", # missing-module-docstring - D100,D104[flake8]
"C0115", # missing-class-docstring - D101,D106[flake8]
"C0116", # missing-function-docstring - D102,D103,D105[flake8]
"C0301", # line-too-long - E501[pycodestyle]
"C0303", # trailing-whitespace - W291,W293[falke8]
"C0304", # missing-final-newline - W292[falke8]
"C0305", # trailing-newlines - W291[falke8]
"C0321", # multiple-statements - E701[falke8]
"C0411", # wrong-import-order - I202[flake8]
"C0413", # wrong-import-position - E402[flake8]
"E0602", # undefined-variable - F821[flake8]
"R0912", # too-many-branches - C901[flake8]
"W0301", # unnecessary-semicolon - E703[flake8]
"W0311", # bad-indentation - E111[flake8]
"W0611", # unused-import - F401[flake8]
"W0612", # unused-variable - F841[flake8]
"W0702", # bare-except - E722[pycodestyle]
# deactivate because unwanted
"W0511", # fixme
"R0903", # too-few-public-methods
# deactivate because of bugs
"W1203", # Use % format in logger funcs | https://github.com/PyCQA/pylint/issues/2354
]
# -- PYTEST CONFIG --------------------------------------------------------------------
[tool.pytest.ini_options]
addopts = "-ra --showlocals"
mock_use_standalone_module = true
# -- COVERAGE CONFIG ------------------------------------------------------------------
[tool.coverage]
[tool.coverage.run]
plugins = ["coverage_conditional_plugin"]
branch = true
parallel = true
context = "static-context"
omit = [
"tests/*",
]
[tool.coverage.paths]
tox_combine = [
"src/rstcheck",
"*/.tox/*/lib/python*/site-packages/rstcheck",
"*/.tox/pypy*/site-packages/rstcheck",
"*/.tox\\*\\Lib\\site-packages\\rstcheck",
]
local_combine = [
"src/rstcheck",
"*/.venv/lib/python*/site-packages/rstcheck",
"*/.venv\\*\\Lib\\site-packages\\rstcheck",
"*/src/rstcheck",
"*\\src\\rstcheck",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"# pragma: no cover",
"if __name__ == ['\"]__main__['\"]:",
"def __str__",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"if 0:",
"if False:",
"if TYPE_CHECKING:",
"if MYPY:",
]
[tool.coverage.html]
show_contexts = true
[tool.coverage.coverage_conditional_plugin.rules]
# use with: # pragma: <KEY>
py-gte-38 = "sys_version_info >= (3, 8)"
py-gte-310 = "sys_version_info >= (3, 10)"