-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
103 lines (89 loc) · 2.65 KB
/
Copy pathpyproject.toml
File metadata and controls
103 lines (89 loc) · 2.65 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
[project]
name = "flake8-stepdown"
version = "0.1.2"
description = "Enforce top-down / newspaper-style function ordering in Python"
readme = "README.md"
authors = [
{ name = "Didier Marin", email = "mail@didiermarin.com" }
]
requires-python = ">=3.12"
dependencies = [
"libcst>=1.1.0",
]
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]
[project.scripts]
stepdown = "flake8_stepdown.cli:main"
[project.entry-points."flake8.extension"]
TDP = "flake8_stepdown.flake8_plugin:TopDownChecker"
[project.optional-dependencies]
flake8 = ["flake8>=6.0"]
[project.urls]
Homepage = "https://github.com/didmar/flake8-stepdown"
Repository = "https://github.com/didmar/flake8-stepdown"
Issues = "https://github.com/didmar/flake8-stepdown/issues"
[tool.ruff]
line-length = 100
target-version = "py313"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Rules that conflict with the ruff formatter (see https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"Q004",
"COM812",
"COM819",
"ISC002",
"E501", # Line length enforced by the formatter (best-effort), not the linter
# Rules that are incompatible with each other
"D203", # Incompatible with D211 (no blank line before class docstring)
"D213", # Incompatible with D212 (multi-line summary on first line)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["B011", "PLR2004", "S101"]
"benchmarks/*" = ["S101"]
"benchmarks/profile_stages.py" = ["T201", "PLR0915", "D103"]
"scripts/*" = ["T201", "PLC0415", "INP001", "ANN", "D100", "D101", "D103", "C901", "PLR0912", "PERF401", "F821"]
"scripts/example_module.py" = ["ALL"]
"scripts/blog_example.py" = ["ALL"]
"tests/fixtures/*" = ["ALL"]
"tests/snapshots/*" = ["ALL"]
[tool.ty.src]
exclude = ["tests/fixtures/*", "tests/snapshots/*", "scripts/blog_example.py", "scripts/example_module.py"]
[tool.ty.environment]
python-version = "3.13"
[tool.hatch.build.targets.wheel]
packages = ["flake8_stepdown"]
[tool.pytest.ini_options]
addopts = "--cov=flake8_stepdown --cov-report=term-missing --cov-fail-under=80 --benchmark-disable"
markers = [
"benchmark: performance benchmark tests",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"pre-commit>=4.5.1",
"pytest>=9.0.2",
"pytest-benchmark>=5.1.0",
"pytest-cov>=7.0.0",
"ruff>=0.15.6",
"ty>=0.0.23",
]