-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (103 loc) · 4.09 KB
/
Copy pathpyproject.toml
File metadata and controls
114 lines (103 loc) · 4.09 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
[build-system]
requires = ["setuptools>=80.9", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pedantic"
version = "3.0.1"
description = "Some useful Python decorators for cleaner software development."
readme = "README.md"
requires-python = ">=3.11,<4.0"
license = "Apache-2.0"
authors = [
{name = "Willi Sontopski", email = "willi_sontopski@arcor.de"},
]
maintainers = [
{name = "Willi Sontopski", email = "willi_sontopski@arcor.de"},
]
keywords = ["decorators", "tools", "helpers", "type-checking", "pedantic", "type annotations"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = ["coverage (>=7.14.0,<8.0.0)"]
[project.urls]
"Bug Tracker" = "https://github.com/LostInDarkMath/pedantic-python-decorators/issues"
"Documentation" = "https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/"
"Source Code" = "https://github.com/LostInDarkMath/pedantic-python-decorators"
[project.optional-dependencies]
# poetry install --extras dev
# pip install .[dev]
dev = [
"coverage==7.14.1",
"deptry==0.25.1",
"docstring-parser==0.18.0",
"pytest==9.0.3",
"pytest-asyncio==1.4.0",
"pytest-cov==7.1.0",
"Flask[async]==3.1.3",
"multiprocess==0.70.19",
"ruff==0.15.17",
]
[tool.deptry.per_rule_ignores]
DEP002 = [
"coverage",
"deptry",
"pytest",
"pytest-asyncio",
"pytest-cov",
"ruff",
]
[tool.setuptools.packages.find]
where = ["."]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
python_files = ["*.py"]
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D202", # No blank lines allowed after function docstring (found 1)
"D203", # incorrect-blank-line-before-class
"D404", # D404 First word of the docstring should not be "This" => free docstrings
"D205", # 1 blank line required between summary line and description => free docstrings
"D212", # multi-line-summary-first-line
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood: "Converts a given type to the typing module equivalent type."
"D413", # Missing blank line after last section ("Raises")
"D415", # First line should end with a period, question mark, or exclamation point
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"FBT001", # Boolean-typed positional argument in function definition => bool params aren't that bad
"FBT002", # Boolean default positional argument in function definition => bool params aren't that bad
"S112", # `try`-`except`-`continue` detected, consider logging the exception
"SIM108", # Use ternary operator `processed_arg = substitutions.get(arg, arg) if isinstance(arg, TypeVar) else arg` instead of `if`-`else`-block
"TRY003", # Avoid specifying long messages outside the exception class
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN001", # Missing type annotation for function argument
"ANN002", # Missing type annotation for *args
"ANN003", # Missing type annotation for **kwargs
"ANN202", # Missing return type annotation for private function
"ANN201", # Missing return type annotation for public function
"ANN204", # Missing return type annotation for special method
"ANN205", # Missing return type annotation for staticmethod
"ANN206", # Missing return type annotation for classmethod
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"E501", # Line too long (138 > 120)
"FBT003", # Boolean positional value in function call
"PLR2004", # Magic value used in comparison, consider replacing `3` with a constant variable
"S101", # Use of `assert` detected
]