-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (98 loc) · 2.86 KB
/
Copy pathpyproject.toml
File metadata and controls
115 lines (98 loc) · 2.86 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "plone-codemod"
dynamic = ["version"]
description = "Automated code migration tool for Plone 5.2 → 6.x upgrades"
readme = "README.md"
license = "GPL-2.0-only"
requires-python = ">=3.12"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Framework :: Plone",
"Topic :: Software Development :: Code Generators",
]
dependencies = [
"libcst>=1.0",
"pyyaml>=6.0",
"semgrep",
"tomlkit>=0.12",
]
[project.urls]
Homepage = "https://github.com/bluedynamics/plone-codemod"
Repository = "https://github.com/bluedynamics/plone-codemod"
Issues = "https://github.com/bluedynamics/plone-codemod/issues"
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"coverage[toml]>=7.0",
]
[project.scripts]
plone-codemod = "plone_codemod.cli:main"
[tool.hatch.version]
source = "vcs"
raw-options = { local_scheme = "no-local-version" }
[tool.hatch.build.targets.wheel]
packages = ["src/plone_codemod"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
source = ["plone_codemod"]
[tool.coverage.report]
show_missing = true
[tool.ruff]
target-version = "py312"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"F", # Pyflakes
"I", # isort
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"E501", # Line too long
]
[tool.ruff.lint.isort]
force-single-line = true
from-first = true
lines-after-imports = 2
lines-between-types = 1
no-sections = true
order-by-type = false
[tool.ruff.lint.pycodestyle]
max-line-length = 120
max-doc-length = 120
[tool.ruff.lint.per-file-ignores]
"src/plone_codemod/cli.py" = ["T201"]
"tests/*" = ["T201"]
[tool.ty.environment]
python-version = "3.12"
extra-paths = ["src"]
# tomlkit uses a dynamic API — subscript/attribute operations on parsed
# documents work at runtime but ty can't infer them statically.
[[tool.ty.overrides]]
include = ["src/plone_codemod/packaging_migrator.py", "tests/test_packaging_migrator.py"]
[tool.ty.overrides.rules]
# ty <0.1 uses non-subscriptable/possibly-missing-attribute,
# ty >=0.1 uses not-subscriptable/unresolved-attribute.
non-subscriptable = "ignore"
not-subscriptable = "ignore"
unsupported-operator = "ignore"
invalid-argument-type = "ignore"
possibly-missing-attribute = "ignore"
unresolved-attribute = "ignore"