-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (160 loc) · 3.98 KB
/
pyproject.toml
File metadata and controls
178 lines (160 loc) · 3.98 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=78.0.2"
]
[project]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Internationalization",
"Topic :: Software Development :: Localization",
"Topic :: Utilities"
]
dependencies = [
"charset-normalizer>2.0,<4.0",
"ruamel.yaml",
"weblate-language-data>=2026.6"
]
description = "A translation file finder used in Weblate."
keywords = [
"i18n",
"l10n",
"gettext",
"weblate",
"translate"
]
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
name = "translation-finder"
requires-python = ">=3.11"
version = "2.24"
[[project.authors]]
email = "michal@weblate.org"
name = "Michal Čihař"
[project.optional-dependencies]
dev = [
"translation-finder[lint,test,types]"
]
lint = [
"prek==0.3.6"
]
test = [
"pytest==9.0.2",
"pytest-cov==7.0.0",
"pytest-github-actions-annotate-failures==0.4.0"
]
types = [
"mypy==1.19.1"
]
[project.readme]
content-type = "text/x-rst"
file = "README.rst"
[project.scripts]
weblate-discover = "translation_finder.api:cli"
[project.urls]
Documentation = "https://docs.weblate.org/"
Download = "https://github.com/WeblateOrg/translation-finder"
Funding = "https://weblate.org/donate/"
Homepage = "https://weblate.org/"
"Issue Tracker" = "https://github.com/WeblateOrg/translation-finder/issues"
"Source Code" = "https://github.com/WeblateOrg/translation-finder"
Twitter = "https://twitter.com/WeblateOrg"
[tool.check-manifest]
ignore = [
"LICENSES/*",
"json/*",
".reuse/dep5",
".well-known/*",
"scripts/*",
"*.toml",
"*.yml",
"*.yaml",
"*.json",
".editorconfig",
".weblate",
"weblate-discovery",
# Symlink causes issues
"translation_finder/test_data/linked",
"translation_finder/test_data/linked/*"
]
[tool.check-wheel-contents]
ignore = [
"W002" # Duplicate test files
]
[tool.coverage.paths]
source = [
"."
]
[tool.coverage.report]
exclude_also = [
"@(abc\\.)?abstractmethod",
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if self\\.debug",
# Type checking
"if TYPE_CHECKING:",
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError"
]
[tool.pytest.ini_options]
doctest_optionflags = "NORMALIZE_WHITESPACE ALLOW_UNICODE"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
extend-safe-fixes = [
"D",
"TCH",
"FLY",
"SIM",
"ANN",
"FA102",
"UP"
]
future-annotations = true
ignore = [
"COM", # CONFIG: No trailing commas
"PT", # CONFIG: Not using pytest
"D107", # CONFIG: skipping __init__ docs for now
"D203", # CONFIG: incompatible with D211
"D212", # CONFIG: incompatible with D213
'ISC001', # CONFIG: formatter
"ARG002", # TODO: Unused method argument (mostly for API compatibility)
"DOC", # CONFIG: Using type annotations instead
"E501" # WONTFIX: we accept long strings (rest is formatted by black)
]
preview = true
select = ["ALL"]
[tool.ruff.lint.flake8-copyright]
min-file-size = 2
# Copyright without a year, see https://github.com/astral-sh/ruff/issues/10062
notice-rgx = "(?i)Copyright\\s+©\\s+"
[tool.ruff.lint.mccabe]
max-complexity = 16
[tool.ruff.lint.per-file-ignores]
"translation_finder/test_*.py" = ["D101", "D102"]
[tool.setuptools]
include-package-data = true
packages = [
"translation_finder",
"translation_finder.discovery"
]
platforms = [
"any"
]
[tool.setuptools.package-dir]
translation_finder = "translation_finder"