-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
97 lines (80 loc) · 2.81 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "injection"
description = "Super-easy lazy importing in Python."
license = "MIT"
version = "1.0.0"
readme = "README.md"
authors = [{ name = "bswck", email = "[email protected]" }]
requires-python = ">=3.9"
[dependency-groups]
dev = [
"mypy>=1.12.0",
"coverage>=7.6.3",
"ruff==0.8.4",
"pytest>=8.3.3",
"covdefaults>=2.3.0",
"pre-commit>=4.0.1",
"pytest-sugar>=1.0.0",
]
[tool.ruff.lint]
# To discuss the presented rationales, contact the author (bswck).
select = ["ALL"]
ignore = [
# Description: Dynamically typed expressions (typing.Any) are disallowed
# Rationale:
# We use Any to allow user to constrain return types of our functions on their own.
# For example, having a function `def foo() -> Any: ...` allows user to write
# `my_foo: int = foo()` and have it passed type checking, since `Any` disables
# type checking completely.
"ANN401",
# Description: 1 blank line required before class docstring
# Rationale: Remove the warning -- D211 (no-blank-line-before-class) preferred.
"D203",
# Description: Multi-line docstring summary should start at the second line
# Rationale: Remove the warning -- D213 (multi-line-summary-second-line) preferred.
"D212",
# Description: Line contains TODO, consider resolving the issue
# Rationale: Not appropriate for the project.
"FIX002",
# Description: Implicitly concatenated string literals on one line
# Rationale: Allegedly conflicts with the formatter.
"ISC001",
# Description: Trailing comma missing
# Rationale: Allegedly conflicts with the formatter.
"COM812",
# Description: Move import into a type-checking block (etc.)
# Rationale: False negatives for Pydantic models.
"TC",
# Description: File is part of an implicit namespace package. Add an `__init__.py`
# Rationale: Implicit namespace packages are a feature
"INP001",
# Description: `print` found
# Rationale: `print` is OK
"T201",
# Description: Missing documentation
# Rationale: Important, but secondary concern
"D100", # Public module
"D101", # Public class
"D102", # Public method
"D103", # Public function
"D104", # Public package
"D105", # Magic method
"D107", # __init__
# Description: Use of `assert` detected
# Rationale: Assertions contribute to validation routines caught by Pydantic
"S101",
# Description: Missing issue link on the line following this TODO
# Rationale: Own semantics
"TD003",
# Description: Wildcard imports used
# Rationale: Red knot :)
"F403",
]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.mypy]
strict = true
explicit_package_bases = true