-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (124 loc) · 3.34 KB
/
pyproject.toml
File metadata and controls
148 lines (124 loc) · 3.34 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
[build-system]
requires = ["setuptools>=61", "setuptools_scm[toml]>=7"]
build-backend = "setuptools.build_meta"
[project]
name = "docstub"
maintainers = [
{name = "Lars Grüter"},
]
description = "Generate Python stub files from docstrings"
readme = "README.md"
license = "BSD-3-Clause"
license-files = ["LICENSE.txt"]
requires-python = ">=3.12"
keywords = ["typing", "stub files", "docstings", "numpydoc"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Code Generators",
"Topic :: Scientific/Engineering",
]
dynamic = ["version"]
dependencies = [
"numpydoc >=1.7.0",
"click >=8.1.7",
"libcst >=1.3.1",
"lark >=1.1.9",
"black >=24.4.2",
"isort >=5.13.2",
]
[project.optional-dependencies]
dev = [
"pre-commit >=3.7",
"ipython",
]
test = [
"pytest >=5.0.0",
"pytest-cov >= 5.0.0",
"mypy>=1.16.0",
"basedpyright",
]
[project.urls]
Homepage = "https://github.com/lagru/docstub"
[project.scripts]
docstub = "docstub.__main__:cli"
[tool.setuptools_scm]
write_to = "src/docstub/_version.py"
[tool.ruff]
src = ["src", "tests"]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
# "PYI", # flake8-pyi
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
"RET504", # Assignment before `return` statement facilitates debugging
"PTH123", # Using builtin open() instead of Path.open() is fine
"SIM108", # Terniary operator is always more readable
"SIM103", # Don't recommend returning the condition directly
]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
testpaths = [
"src",
"tests",
]
[tool.coverage]
run.source = ["docstub"]
[tool.changelist.label_section_map]
".*enhancement.*" = "Enhancement"
".*performance.*" = "Performance"
".*fix.*" = "Bug Fixes"
".*documentation.*" = "Documentation"
".*devops.*" = "DevOps"
".*maintenance.*" = "Maintenance"
[tool.docstub.types]
Path = "pathlib"
[tool.docstub.type_prefixes]
re = "re"
cst = "libcst"
lark = "lark"
numpydoc = "numpydoc"
[tool.mypy]
strict = true
disable_error_code = ["type-arg"]
# Don't type test suite itself but check if usage makes sense with docstub's stubs
[[tool.mypy.overrides]]
module = "tests.*"
check_untyped_defs = true
allow_untyped_defs = true
disable_error_code = ["var-annotated", "union-attr"]
# NumPyDoc isn't typed?
[[tool.mypy.overrides]]
module = ["numpydoc.*"]
ignore_missing_imports = true
[tool.basedpyright]
stubPath = "stubs/"
typeCheckingMode = "standard"