-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
100 lines (84 loc) · 1.82 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
98
99
100
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "mypackage"
version = "0.1.0"
description = ""
authors = ["Stijn de Gooijer <[email protected]>"]
repository = "https://github.com/stinodego/python-cookiecutter"
readme = "README.md"
packages = [{include = "mypackage", from = "src"}]
[tool.poetry.scripts]
mycli = 'mypackage.main:main'
[tool.poetry.dependencies]
python = ">=3.11"
polars = "^0.20.30"
[tool.poetry.group.test.dependencies]
pytest = "^8.2.1"
pytest-mock = "^3.14.0"
coverage = "^7.5.3"
[tool.poetry.group.lint.dependencies]
pre-commit = "^3.7.1"
ruff = "^0.4.6"
mypy = "^1.10.0"
[tool.ruff]
src = ["src"]
line-length = 88
target-version = "py311"
fix = true
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle
"W", # pycodestyle
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
"S", # flake8-bandit
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"RUF", # Ruff-specific rules
]
ignore = [
# Line length regulated by ruff formatter
"E501",
# Docstrings not required
"D1",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.mypy]
files = "src"
mypy_path = "src"
python_version = "3.11"
strict = true
enable_error_code = [
"redundant-expr",
"truthy-bool",
"ignore-without-code",
]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
[tool.coverage.run]
source = ["src"]
branch = true
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_also = [
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]