-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
142 lines (122 loc) · 4.02 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
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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "Toisto"
version = "0.33.2"
authors = [{ name = "Frank Niessink", email = "frank@niessink.com" }]
description = "Toisto is a command-line terminal app to practice languages."
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Education",
]
dependencies = [
"dramatic == 0.4.1.post1",
"gTTS == 2.5.4",
"pygame == 2.6.1",
"requests >= 2.28.0",
"rich == 13.9.4",
"rich-argparse == 1.6.0",
]
[project.optional-dependencies]
dev = [
"bandit == 1.8.0",
"build == 1.2.2.post1",
"coverage == 7.6.9",
"fixit == 2.1.0",
"gprof2dot == 2024.6.6",
"green == 4.0.2",
"mypy == 1.13.0",
"ruff == 0.8.3",
"types-requests == 2.32.0.20241016",
"unittest-xml-reporting == 3.2.0",
"vulture == 2.14",
]
[project.scripts]
toisto = "toisto.app:main"
[project.urls]
"Homepage" = "https://github.com/fniessink/toisto"
"Issue tracker" = "https://github.com/fniessink/toisto/issues"
"Changelog" = "https://github.com/fniessink/toisto/blob/main/CHANGELOG.md"
[tool.coverage.run]
branch = true
relative_files = true
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
fail_under = 100
skip_covered = true
[tool.coverage.xml]
output = "build/coverage.xml"
[tool.fixit]
python-version = "3.10"
[tool.mypy]
python_version = "3.10"
strict = true
[[tool.mypy.overrides]]
module = ["dramatic", "green.output", "gtts", "xmlrunner.result"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "toisto.persistence.json_file"
disable_error_code = "type-arg" # Don't complain about JSON types not being completely specified
[[tool.mypy.overrides]]
module = ["tests.*"]
allow_untyped_defs = true # Allow for not specifying None as return value on every test method
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ARG002", # Prevent 'Unused method argument: `concept`' errors
"C408", # Prevent 'Unnecessary `dict` call (rewrite as a literal)' errors
"COM812", # This rule may cause conflicts when used with the ruff formatter
"D107", # Prevent 'Missing docstring in `__init__`' errors
"D203", # Prevent warning about incompatible rules
"D213", # Prevent warning about incompatible rules
"DTZ005", # Prevent 'The use of `datetime.datetime.now()` without `tz` argument is not allowed' errors
"FBT003", # Prevent 'Boolean positional value in function call' errors
"ISC001", # This rule may cause conflicts when used with the ruff formatter
"PT", # We don't use Pytest
"TC001", # Prevent 'Move application import `...` into a type-checking block' errors
"TC002", # Prevent 'Move third-party import `...` into a type-checking block' errors
"TC003", # Prevent 'Move standard library import `...` into a type-checking block' errors
"TID252", # Prevent 'Relative imports from parent modules are banned' errors
]
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"second-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"second-party" = ["toisto"]
[tool.ruff.lint.per-file-ignores]
"src/toisto/app.py" = ["E402"]
"src/toisto/ui/speech.py" = ["FBT001", "FBT002"]
"__init__.py" = ["D104"]
"tests/*" = ["ANN201"]
".vulture-whitelist.py" = ["ALL"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"*" = ["*.json"]
languages = ["*.txt"]
[tool.vulture]
ignore_names = ["_SubParsersAction", "optionxform"]