-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (115 loc) · 4.53 KB
/
pyproject.toml
File metadata and controls
137 lines (115 loc) · 4.53 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
125
126
127
128
129
130
131
132
133
134
135
136
137
[project]
name = "based-utils"
version = "1.0.21"
description = "Add your description here"
authors = [
{ name = "Huib Piguillet", email = "huib@proton.me" }
]
requires-python = ">=3.14"
readme = "README.md"
license = "MIT"
keywords = [
"base utilities"
]
classifiers = [
"Intended Audience :: Developers",
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = []
[project.optional-dependencies]
iter = [
"more_itertools",
]
keyboard = [
"pynput",
]
[dependency-groups]
dev = [
"mypy",
"powerchord",
"pre-commit",
"pytest",
"pytest-asyncio",
"ruff",
"types-pynput",
]
[project.urls]
PyPI = "https://pypi.org/project/based-utils/"
Github = "https://github.com/githuib/based-utils/"
#[tool.uv.sources]
#powerchord = { path = "../powerchord", editable = true }
[project.scripts]
colors = "based_utils.entry_points:print_colors"
[build-system]
requires = ["uv_build>=0.9.3,<0.10.0"]
build-backend = "uv_build"
[tool.powerchord.tasks]
typing = "uv run --all-extras mypy"
doctests = "pytest"
lint = "ruff check"
[tool.mypy]
files = ["src"] #, "tests"]
implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.pytest.ini_options]
addopts = "-ra --doctest-modules" # -q
#asyncio_mode = "auto"
#asyncio_default_fixture_loop_scope = "function"
testpaths = [
"src/based_utils",
# "tests",
]
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.ruff.lint]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Default value: ["E4", "E7", "E9", "F"]
select = ["ALL"]
ignore = [
# pydocstyle (D)
"D100", # https://docs.astral.sh/ruff/rules/undocumented-public-module/ Missing docstring in public module
"D101", # https://docs.astral.sh/ruff/rules/undocumented-public-class/ Missing docstring in public class
"D102", # https://docs.astral.sh/ruff/rules/undocumented-public-method/ Missing docstring in public method
"D103", # https://docs.astral.sh/ruff/rules/undocumented-public-function/ Missing docstring in public function
"D104", # https://docs.astral.sh/ruff/rules/undocumented-public-package/ Missing docstring in public package
"D105", # https://docs.astral.sh/ruff/rules/undocumented-magic-method/ Missing docstring in magic method
"D106", # https://docs.astral.sh/ruff/rules/undocumented-public-nested-class/ Missing docstring in public nested class
"D107", # https://docs.astral.sh/ruff/rules/undocumented-public-init/ Missing docstring in __init__
# warning: The following rule may cause conflicts when used with the formatter: `D203`. To avoid unexpected behavior, we recommend disabling this rule
"D203", # https://docs.astral.sh/ruff/rules/incorrect-blank-line-before-class/ 1 blank line required before class docstring
"D211", # https://docs.astral.sh/ruff/rules/blank-line-before-class/ No blank lines allowed before class docstring
"D212", # https://docs.astral.sh/ruff/rules/multi-line-summary-first-line/ Multi-line docstring summary should start at the first line
# flake8-commas (COM)
# warning: The following rule may cause conflicts when used with the formatter: `COM812`
"COM812", # https://docs.astral.sh/ruff/rules/missing-trailing-comma/ Trailing comma missing
# flake8-fixme (FIX)
"FIX001", # https://docs.astral.sh/ruff/rules/line-contains-fixme/ line-contains-fixme Line contains FIXME, consider resolving the issue
"FIX002", # https://docs.astral.sh/ruff/rules/line-contains-todo/ line-contains-todo Line contains TODO, consider resolving the issue
# flake8-pyi (PYI)
"PYI025", # https://docs.astral.sh/ruff/rules/unaliased-collections-abc-set-import/ Use from collections.abc import Set as AbstractSet to avoid confusion with the set builtin
# flake8-todos (TD)
"TD003", # https://docs.astral.sh/ruff/rules/missing-todo-link/ missing-todo-link Missing issue link for this TODO
# Pylint (PL)
# Refactor (PLR)
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/ Magic value used in comparison, consider replacing {value} with a constant variable
# Ruff-specific rules (RUF)
"RUF013", # https://docs.astral.sh/ruff/rules/implicit-optional/ PEP 484 prohibits implicit Optional
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = [
"C901", #too complex
]
[tool.ruff.lint.flake8-type-checking]
#exempt-modules = []
strict = true
[tool.ruff.lint.isort]
split-on-trailing-comma = false