-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
67 lines (57 loc) · 1.95 KB
/
pyproject.toml
File metadata and controls
67 lines (57 loc) · 1.95 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
[tool.poetry]
name = "python-package-template"
version = "0.2.0"
description = ""
authors = ["rlipperts <rlipperts@techfak.uni-bielefeld.de>"]
readme = "README.md"
packages = [
{ include = "python_package_template", from = "src" },
]
[tool.poetry.dependencies]
python = "~3.12"
[tool.poetry.group.dev.dependencies]
pre-commit = "^4.0"
ruff = "^0.9.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# linting ---------------------------------------------------------------------
[tool.ruff]
# Enable all rules.
target-version = "py312"
# Ignores:
# - D100: Allow modules without docstring for cleaner single-class modules
# - D105: Allow magic methods without docstring
# - ANN101, ANN102: No Typehints for self and cls
# - FIX002: Generally allow todo comments, if formatted correctly
# Ignore __init__.py files and sphinx code
exclude = ["*/__init__.py", "doc/"]
[tool.ruff.lint]
ignore = ["D100", "D105", "FIX002"]
select = ["ALL"]
typing-modules = ["numpy.typing"]
unfixable = ["ERA001"]
# Allow omitting type annotation for __init__ return value
flake8-annotations.mypy-init-return = true
pydocstyle.convention = "numpy"
[tool.ruff.lint.per-file-ignores]
# Ignores for tests:
# - D100, D103: Don't require docstrings for tests
# - S101: Allow asserts in tests
# - ANN001, ANN201, ANN202: Don't require type annotations for tests
# - INP001: No __init__.py files in test directory
# - PLR0913: Allow many arguments in function calls
# - SLF001: Allow accessing private members in tests
"tests/*" = ["D100", "D101", "D102", "D103", "S101", "ANN001", "ANN201", "ANN202", "INP001", "PLR0913", "SLF001"]
"scripts/*" = ["SLF001", "D103"]
# type-checking --------------------------------------------------------------
[tool.pyright]
include = ["src"]
# strict = ["src"]
exclude = []
reportMissingImports = true
reportMissingTypeStubs = false
# this requires python 3.12
# reportImplicitOverride = true
pythonVersion = "3.12"
pythonPlatform = "Linux"