-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
97 lines (86 loc) · 2.05 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
91
92
93
94
95
96
97
[build-system]
build-backend = "poetry.core.masonry.api"
requires = [
"poetry-core>=2",
]
[project]
name = "subt"
version = "0.0.1"
description = "Translate a subtitle file"
readme = "README.md"
keywords = [
"subtitle",
"translate",
]
license = { text = "MIT" }
authors = [
{ name = "eggplants", email = "[email protected]" },
]
requires-python = ">=3.12,<4"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"pysubs2>=1.8,<2",
"translatepy>=2.3,<3",
]
urls.Repository = "https://github.com/eggplants/subt"
scripts.subt = "subt.main:main"
[tool.poetry]
requires-poetry = ">=2.0"
packages = [
{ include = "subt" },
]
[tool.poetry.group.dev.dependencies]
pre-commit = ">=3.7,<5.0"
mypy = "^1.11.0"
pytest = "^8.3.2"
pytest-cov = ">=5,<7"
taskipy = "^1.13.0"
[tool.poetry.requires-plugins]
poetry-plugin-shell = ">=1.0"
[tool.black]
target-version = [ "py312" ]
[tool.ruff]
lint.select = [ "ALL" ]
lint.ignore = [
"D211", # No blank lines allowed before class docstring
"D213", # Multi-line docstring summary should start at the second line
]
lint.per-file-ignores."main.py" = [
"T201", # `print` found
]
lint.per-file-ignores."tests/*" = [
"D",
"S101", # Use of assert detected
]
lint.pydocstyle.convention = "google"
[tool.mypy]
python_version = "3.12"
strict = true
# much harder
# disallow_any_decorated = true
# disallow_any_explicit = true
# disallow_any_expr = true
disallow_any_unimported = true
implicit_optional = false # for mypy<1.0
strict_concatenate = true
warn_unreachable = true
# message
pretty = true
show_column_numbers = true
show_error_context = true
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"
[tool.taskipy.tasks]
test = "pytest --cov=subt --cov-report=term"
"test:ci" = "task test --cov-report=xml:cov.xml"
lint = "pre-commit run -a"
profile = "python -m cProfile"