-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (102 loc) · 2.32 KB
/
Copy pathpyproject.toml
File metadata and controls
116 lines (102 loc) · 2.32 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
[project]
name = "package-name"
description = "A template for a nice package"
authors = [{ name = "kivicode.dev@gmail.com", email = "kivicode@yandex.com" }]
license = "MIT"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.11"
dependencies = []
[dependency-groups]
dev = ["ruff~=0.9.6", "mypy~=1.15.0", "pre-commit~=4.1.0", "ipykernel~=6.29.5"]
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
warn_unused_ignores = false
show_error_codes = true
check_untyped_defs = true
no_implicit_optional = true
explicit_package_bases = true
[tool.ruff]
unsafe-fixes = true
exclude = [".venv"]
extend-include = ["*.ipynb"]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = [
# Default rules
"E", # pycodestyle errors
"F", # Pyflakes
"C4", # flake8-comprehensions
"C90", # mccabe complex structure
"D", # pydocstyle
"I", # isort
"PT", # flake8-pytest-style
"PL", # Pylint
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
"S", # flake8-bandit
"ANN", # flake8-annotations
"B", # flake8-bugbear
"NPY", # NumPy-specific rules
"UP045",
]
extend-select = [
"RUF022", # unsorted-dunder-all
"PLR6301", # no-self-use
]
ignore = [
"B024",
"B028", # no-explicit-stacklevel
"B904",
"C901", # complex-structure
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D415",
"D200",
"D205",
"D212",
"E722",
"ANN002",
"ANN003",
"ANN204", # dynamically typed expressions
"ANN401",
"PLR0913",
"PLR2004", # magic value used in comparison
"PT028", # test function parameter has default argument
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101",
"S105",
"S106",
"ANN001",
"ANN201",
"PLR6301",
"PT011",
]
[tool.ruff.lint.pylint]
max-locals = 20
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 120
[tool.bandit]
exclude_dirs = [".venv"]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "package_name/_version.py"