-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
108 lines (90 loc) · 2.11 KB
/
Copy pathpyproject.toml
File metadata and controls
108 lines (90 loc) · 2.11 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
[project]
name = "lodestone-server-manager"
version = "0.0.1"
description = "Manage your Minecraft servers in the terminal."
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"platformdirs>=4.5.1",
"requests>=2.32.5",
"rich>=14.3.2",
"textual>=7.5.0",
]
[project.urls]
repository = "https://github.com/milndr/lodestone-server-manager"
[project.scripts]
lodestone = "lodestone.__main__:main"
[tool.uv]
package = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["lodestone"]
[dependency-groups]
dev = ["pre-commit>=4.5.1", "ruff>=0.11.0", "pyright>=1.1.400"]
[tool.ruff.lint]
# Core rule sets
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"B", # flake8-bugbear
"C90", # McCabe complexity
"ANN", # type annotations
"I", # isort (import sorting)
"UP", # pyupgrade
"PTH", # use pathlib
"SIM", # simplify
"RET", # return
"N", # naming
"S", # security best practices
"TRY", # try/except best practices
"G", # logging
"FBT", # boolean trap
"A", # python builtins used as vars or parameters
"COM", # missing trailing commas
"ARG", # unused arguments
]
# Noisy or contextually acceptable rules
ignore = [
# Docstrings (optional discipline)
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
# Handled by Black/Ruff Format
"E203",
"E501",
"COM812",
# Pragmatic typing
"ANN201", # no return type for public funcs
"ANN204", # no return type for __init__
# Exceptions / debugging
"TRY003", # short exception messages OK
# Security (non-crypto context)
"S311", # random is fine
"S603",
# Imports / scripts
"E402", # imports not at top level
]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint.mccabe]
max-complexity = 15
# Relax rules in tests
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D", # no docstring pressure
"ANN", # loose typing
]
[tool.ruff]
# Align with Black
line-length = 88
target-version = "py311"
# Project hygiene
exclude = [".venv", "venv", "__pycache__", "build", "dist"]