-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (104 loc) · 2.72 KB
/
pyproject.toml
File metadata and controls
124 lines (104 loc) · 2.72 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
[project]
name = "oil"
version = "0.0.3"
description = "oil is a utility library."
readme = { file = "README", content-type = "text/markdown" }
authors = [
{ name = "iris", email = "iris@serv.pink" },
]
requires-python = ">=3.10"
dependencies = [
"psycopg2",
"python-dateutil",
"requests",
]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
[project.urls]
Homepage = "https://github.com/FanFicDev/python-oil"
"Bug Tracker" = "https://github.com/FanFicDev/python-oil/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"hatch",
"mypy",
"pytest",
"pytest-cov",
"ruff",
"tox",
"tox-uv",
"types-psycopg2",
"types-python-dateutil",
"types-requests",
]
[tool.mypy]
follow_imports = "normal"
ignore_missing_imports = true
python_version = "3.10"
# https://mypy.readthedocs.io/en/stable/config_file.html#disallow-dynamic-typing
disallow_any_unimported = true
disallow_any_expr = true
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_subclassing_any = true
# https://mypy.readthedocs.io/en/stable/config_file.html#untyped-definitions-and-calls
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
# https://mypy.readthedocs.io/en/stable/config_file.html#none-and-optional-handling
# default: implicit_optional = false
# default: strict_optional = true
# https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings
warn_redundant_casts = true
warn_unused_ignores = true
# default: warn_no_return = true
warn_return_any = true
warn_unreachable = true
# https://mypy.readthedocs.io/en/latest/config_file.html#miscellaneous-strictness-flags
implicit_reexport = false
# https://mypy.readthedocs.io/en/stable/config_file.html#configuring-error-messages
show_error_context = true
show_column_numbers = true
show_error_codes = true
[tool.ruff.lint]
extend-select = ["ALL"]
ignore = [
"COM812", # missing-trailing-comma
"D203", # one-blank-line-before-class
"D212", # multi-line-summary-first-line
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D", # pydocstyle
"S101", # assert
"PLR2004", # magic-value-comparison
]
[tool.coverage.report]
exclude_also = [
"if typing.TYPE_CHECKING:",
]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = True
env_list =
type, lint, py3.{12,11,10}
skip_missing_interpreters = true
[testenv]
commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs}
[testenv:type]
skip_install = true
commands = mypy {posargs:src tests}
[testenv:lint]
skip_install = true
commands =
ruff format {posargs:src tests}
ruff check {posargs:src tests}
"""