-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
197 lines (179 loc) · 5.08 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
[build-system]
requires = ["setuptools >= 64"]
build-backend = "setuptools.build_meta"
[project]
name = "idlemypyextension"
dynamic = ["version"]
authors = [
{ name="CoolCat467", email="[email protected]" },
]
description = "Mypy daemon extension for Python IDLE"
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development",
"Topic :: Text Editors :: Integrated Development Environments (IDE)",
"Topic :: Utilities",
"Operating System :: OS Independent",
"Framework :: IDLE",
"Framework :: Trio",
"Typing :: Typed",
]
keywords = ["mypy", "dmypy", "idle", "extension", "development", "daemon"]
dependencies = [
"mypy~=1.14.1",
'orjson; implementation_name == "cpython"',
"trio~=0.28.0",
]
[tool.setuptools.dynamic]
version = {attr = "idlemypyextension.__init__.__version__"}
[project.optional-dependencies]
user = ["idleuserextend~=0.0.1"]
tests = [
"pytest>=5.0",
"pytest-cov",
"pytest-trio",
"coverage>=7.2.5",
"uv>=0.5.21",
]
tools = [
'black>=24.10.0; implementation_name == "cpython"',
"ruff>=0.9.2",
"codespell>=2.3.0",
]
[project.urls]
"Source" = "https://github.com/CoolCat467/idlemypyextension"
"Bug Tracker" = "https://github.com/CoolCat467/idlemypyextension/issues"
[project.scripts]
idlemypyextension = "idlemypyextension:cli_run"
[tool.setuptools.package-data]
idlemypyextension = ["py.typed"]
[tool.mypy]
files = ["src/idlemypyextension/",]
mypy_path = "stubs"
show_column_numbers = true
show_error_codes = true
show_traceback = true
disallow_any_decorated = true
disallow_any_unimported = true
ignore_missing_imports = true
local_partial_types = true
no_implicit_optional = true
strict = true
warn_unreachable = true
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.pycln]
all = true
disable_all_dunder_policy = true
[tool.typos]
files.extend-exclude = ["*.pyi"]
[tool.black]
line-length = 79
[tool.ruff]
line-length = 79
fix = true
include = ["*.py", "*.pyi", "**/pyproject.toml"]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"E", # Error
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"I", # isort
"ICN", # flake8-import-conventions
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"Q", # flake8-quotes
"R", # Refactor
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # Warning
"YTT", # flake8-2020
]
extend-ignore = [
"D203", # one-blank-line-before-class
"D204", # one-blank-line-after-class
"D211", # no-blank-line-before-class
"D213", # multi-line-summary-second-line
"D417", # undocumented-param "Missing argument descriptions"
"E501", # line-too-long
"PYI041", # redundant-numeric-union
"S101", # assert (use of assert for tests and type narrowing)
"SIM117", # multiple-with-statements
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D100", # undocumented-public-module
"D103", # undocumented-public-function
"D107", # undocumented-public-init
]
"stubs/*" = [
"A001", # builtin-variable-shadowing
"A002", # builtin-argument-shadowing
"N802", # invalid-function-name (lowercase)
"N803", # invalid-argument-name (lowercase)
"N815", # mixed-case-variable-in-class-scope
"N816", # mixed-case-variable-in-global-scope
"N818", # error-suffix-on-exception-name
]
[tool.pytest.ini_options]
addopts = "--cov-report=xml --cov-report=term-missing --cov=idlemypyextension"
testpaths = [
"tests",
]
[tool.coverage.run]
branch = true
source_pkgs = ["idlemypyextension"]
omit = []
parallel = true
relative_files = true
source = ["."]
[tool.coverage.report]
precision = 1
skip_covered = true
exclude_also = [
"pragma: no cover",
"abc.abstractmethod",
"if TYPE_CHECKING.*:",
"if _t.TYPE_CHECKING:",
"if t.TYPE_CHECKING:",
"@overload",
'class .*\bProtocol\b.*\):',
"raise NotImplementedError",
]
partial_branches = [
"pragma: no branch",
"if not TYPE_CHECKING:",
"if not _t.TYPE_CHECKING:",
"if not t.TYPE_CHECKING:",
"if .* or not TYPE_CHECKING:",
"if .* or not _t.TYPE_CHECKING:",
"if .* or not t.TYPE_CHECKING:",
]