-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
105 lines (92 loc) · 4.05 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
[tool.poetry]
authors = [
"DetachHead <[email protected]>",
"KotlinIsland <[email protected]>",
]
description = "Utilities for basedmypy"
name = "basedtyping"
version = "0.1.10"
[tool.poetry.dependencies]
python = "^3.9"
typing_extensions = "^4.12.2"
[tool.poetry.group.dev.dependencies]
basedmypy = "^2.7"
pytest = "^8"
ruff = "~0.2.1"
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.8"]
[tool.pyprojectx]
main = ["poetry==1.7.1"]
[tool.mypy]
python_version = 3.9
packages = ["basedtyping", "tests"]
always_false = ["BASEDMYPY_TYPE_CHECKING"]
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.pytest.ini_options]
filterwarnings = "error"
xfail_strict = true
[tool.ruff]
respect-gitignore = true
line-length = 100
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"ANN", # flake8-annotations (covered by pyright)
"EM", # flake8-errmsg
"FIX", # flake8-fixme
"PLR0913", # Too many arguments to function call
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLR1722", # Use `sys.exit()` instead of `exit`
"PLW2901", # `for` loop variable overwritten by assignment target
"PLE0605", # Invalid format for `__all__`, must be `tuple` or `list` (covered by mypy)
"PLR0911", # Too many return statements
"PLW0603", # Using the global statement is discouraged
"PLC0105", # `TypeVar` name does not reflect its covariance
"PLC0414", # Import alias does not rename original package (used by mypy for explicit re-export)
"RUF013", # PEP 484 prohibits implicit Optional (covered by mypy)
"RUF016", # Slice in indexed access to type (covered by mypy)
"TRY002", # Create your own exception
"TRY003", # Avoid specifying long messages outside the exception class
"D10", # Missing docstring
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary line and description
"D209", # Multi-line docstring closing quotes should be on a separate line
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D403", # First word of the first line should be properly capitalized
"D404", # First word of the docstring should not be `This`
"D405", # Section name should be properly capitalized
"D406", # Section name should end with a newline
"D415", # First line should end with a period, question mark, or exclamation point
"D418", # Function/Method decorated with @overload shouldn't contain a docstring (vscode supports it)
"D413", # blank-line-after-last-section
"PT013", # Found incorrect import of pytest, use simple import pytest instead (only for bad linters that can't check the qualname)
"TD002", # Missing author in TODO
"CPY001", # missing-copyright-notice
"C901", # max-complexity
"SLF001", # private-member-access (covered by pyright)
"PLC2701", # import-private-name (covered by pyright)
"UP006", # non-pep585-annotation (covered by pyright)
"UP007", # non-pep604-annotation (covered by pyright)
"UP035", # deprecated-import (covered by pyright)
"ISC001", # single-line-implicit-string-concatenation (conflicts with formatter)
"COM812", # missing-trailing-comma (conflicts with formatter)
"ISC003", # explicit-string-concatenation (https://github.com/astral-sh/ruff/issues/9965)
"N816", # clashes with based `in_` denotation
]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S"] # The tests don't need to be secure
[tool.ruff.lint.isort]
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
split-on-trailing-comma = false