-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
169 lines (140 loc) · 3.83 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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "python-exports"
version = "1.3.0dev0"
description = "@export decorator that adds a function or class to __all__"
authors = ["Joren Hammudoglu <[email protected]>"]
license = "MIT"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
repository = "https://github.com/jorenham/exports"
documentation = "https://github.com/jorenham/exports/blob/master/README.md"
packages = [{include = "exports"}] # don't remove
[tool.poetry.urls]
"Issues" = "https://github.com/jorenham/exports/issues"
"Changelog" = "https://github.com/jorenham/exports/releases"
[tool.poetry.dependencies]
python = "^3.9"
[tool.poetry.group.dev.dependencies]
basedmypy = {version = "^2.8.0", extras = ["faster-cache"]}
basedpyright = "^1.22.0"
codespell = "^2.3.0"
pre-commit = "^4.0.1"
pytest = "^8.3.4"
ruff = "^0.8.1"
sp-repo-review = {version = "^2024.8.19", extras = ["cli"], python="^3.10"}
tox = "^4.23.2"
[tool.poetry.group.test-github]
optional = true
[tool.poetry.group.test-github.dependencies]
pytest-github-actions-annotate-failures = ">=0.2.0,<1.0"
[tool.codespell]
skip = '*.lock,.venv,.vscode,dist'
context = 2
[tool.mypy]
python_version = "3.9"
modules = ["exports", "tests"]
exclude = ["^.venv/.*"]
strict = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
show_error_code_links = true
warn_redundant_casts = true
warn_unused_ignores = true
# todo
disallow_any_expr = false
disallow_any_explicit = false
disallow_any_decorated = false
[tool.pyright]
include = ["exports", "tests"]
exclude = [".venv"]
stubPath = "."
venvPath = "."
venv = ".venv"
pythonVersion = "3.9"
pythonPlatform = "All"
typeCheckingMode = "all"
reportUnusedCallResult = false # https://github.com/microsoft/pyright/issues/8650
[tool.pytest.ini_options]
addopts = ["-ra", "--strict-config", "--strict-markers"]
filterwarnings = ["error"]
log_cli_level = "INFO"
minversion = "8.0"
testpaths = ["exports", "tests"]
xfail_strict = true
[tool.repo-review]
ignore = [
"PY004", # no `docs/`
"PC110", # no auto-format (yet)
"PC140", # no mypy
"PC170", # no sphinx
"PC180", # no css or js
"MY", # no mypy
"RTD", # no readthedocs
]
[tool.ruff]
src = ["exports"]
target-version = "py39"
indent-width = 4
show-fixes = true
force-exclude = true
extend-exclude = [".github", ".vscode", "tests"]
[tool.ruff.lint]
preview = true
select = ["ALL"]
ignore = ["CPY", "DOC", "EM102", "TRY003", "D104"]
[tool.ruff.lint.isort]
case-sensitive = true
combine-as-imports = true
known-first-party = ["exports"]
lines-after-imports = 2
lines-between-types = 0
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.format]
preview = true
quote-style = "single"
# keep in sync with .editorconfig
indent-style = "space"
line-ending = "lf"
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
requires = tox>=4
envlist =
repo-review
pre-commit
py{39,310,311,312,313}
[testenv]
description = pytest
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands = poetry run pytest
[testenv:pre-commit]
description = pre-commit
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands = poetry run pre-commit run --all-files
[testenv:repo-review]
description = repo-review
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands = poetry run repo-review .
"""