-
Notifications
You must be signed in to change notification settings - Fork 137
/
pyproject.toml
90 lines (82 loc) · 2.95 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
[project]
name = "pyxform"
version = "3.0.0"
authors = [
{name = "github.com/xlsform", email = "[email protected]"},
]
description = "A Python package to create XForms for ODK Collect."
readme = "README.rst"
requires-python = ">=3.10"
dependencies = [
"xlrd==2.0.1", # Read XLS files
"openpyxl==3.1.3", # Read XLSX files
"defusedxml==0.7.1", # Parse XML
]
[project.optional-dependencies]
# Install with `pip install pyxform[dev]`.
dev = [
"formencode==2.1.0", # Compare XML
"lxml==5.3.0", # XPath test expressions
"psutil==6.1.0", # Process info for performance tests
"ruff==0.7.1", # Format and lint
]
[project.urls]
Homepage = "https://pypi.python.org/pypi/pyxform/"
Repository = "https://github.com/XLSForm/pyxform/"
[project.scripts]
xls2xform = "pyxform.xls2xform:main_cli"
pyxform_validator_update = "pyxform.validators.updater:main_cli"
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "pyxform"
[tool.flit.sdist]
exclude = ["docs", "tests"]
[tool.ruff]
line-length = 90
target-version = "py310"
fix = true
show-fixes = true
output-format = "full"
src = ["pyxform", "tests"]
[tool.ruff.lint]
# By default, ruff enables flake8's F rules, along with a subset of the E rules.
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle error
# "ERA", # eradicate (commented out code)
"F", # pyflakes
"I", # isort
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
# "PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
# "RET", # flake8-return
"RUF", # ruff-specific rules
"S", # flake8-bandit
# "SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warning
]
ignore = [
"E501", # line-too-long (we have a lot of long strings)
"F821", # undefined-name (doesn't work well with type hints, ruff 0.1.11).
"PERF401", # manual-list-comprehension (false positives on selective transforms)
"PERF402", # manual-list-copy (false positives on selective transforms)
"PLR0911", # too-many-return-statements (complexity not useful to warn every time)
"PLR0912", # too-many-branches (complexity not useful to warn every time)
"PLR0913", # too-many-arguments (complexity not useful to warn every time)
"PLR0915", # too-many-statements (complexity not useful to warn every time)
"PLR2004", # magic-value-comparison (many tests expect certain numbers of things)
"PLW2901", # redefined-loop-name (usually not a bug)
"RUF001", # ambiguous-unicode-character-string (false positives on unicode tests)
"S310", # suspicious-url-open-usage (prone to false positives, ruff 0.1.11)
"S320", # suspicious-xmle-tree-usage (according to defusedxml author lxml is safe)
"S603", # subprocess-without-shell-equals-true (prone to false positives, ruff 0.1.11)
"TRY003", # raise-vanilla-args (reasonable lint but would require large refactor)
]
# per-file-ignores = {"tests/*" = ["E501"]}