-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
126 lines (111 loc) · 2.71 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[tool.poetry]
name = "keyof"
version = "0.4.0"
description = ""
authors = ["Viliam Valent <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/ViliamV/keyof"
homepage = "https://github.com/ViliamV/keyof"
packages = [{include = "keyof"}]
[tool.poetry.dependencies]
python = "^3.11"
[tool.poetry.group.dev.dependencies]
mypy = "^1.4.1"
ruff = ">=0.1.3"
poethepoet = "^0.21.1"
pyright = "^1.1.318"
pytest = "^7.4.3"
pytest-mypy-testing = "^0.1.1"
pytest-cov = "^4.1.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
python_version = "3.11"
plugins = ["keyof.mypy_plugin"]
follow_imports = "silent"
warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_reexport = true
ignore_missing_imports = true
show_error_codes = true
cache_dir = ".cache/mypy/"
[tool.pyright]
typeCheckingMode = "strict"
[tool.ruff]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # mccabe
"E", # pycodestyle
"F", # Pyflakes
"N", # pep8-naming
"NPY", # NumPy
"PD", # pandas-vet
"PIE", # flake8-pie
"PLE", # Pylint Error
"PTH", # flake8-use-pathlib
"RUF", # Ruff
"S", # flake8-bandit
"SIM", # flakes8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"I001", # isort
]
cache-dir = ".cache/ruff"
line-length = 120
target-version = "py311"
# Never enforce line length violations
ignore = ["E501"]
output-format = "grouped"
extend-exclude = [".cache"]
ignore-init-module-imports = true
[tool.pytest.ini_options]
testpaths = ["tests/"]
addopts = [
"-ra",
"--capture=no",
"--strict-markers",
"--cov-report=term-missing:skip-covered",
"--no-cov-on-fail",
]
markers = [
"slow: Slow tests",
"database: Requires a DB connection",
"integration: Dependent on some external source and may not suitable to run without setup & supervision",
]
cache_dir = ".cache/pytest/"
[tool.poe.tasks]
[tool.poe.tasks.clean]
help = "Remove generated files"
cmd = """
rm -rf .coverage
.cache
.pytest_cache
./**/__pycache__
dist
htmlcov
"""
[tool.poe.tasks.format]
help = "Run formating tools on the code base"
sequence = ["ruff --fix-only .", "ruff format ."]
default_item_type = "cmd"
[tool.poe.tasks.style]
help = "Check formating on the code base"
cmd = "ruff format --check ."
[tool.poe.tasks.type]
help = "Run the mypy type checker"
cmd = "mypy keyof"
[tool.poe.tasks.lint]
help = "Run ruff linter on package"
cmd = "ruff ."
[tool.poe.tasks.test]
help = "Run pytest"
cmd = "pytest --cov=keyof"