-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (116 loc) · 2.93 KB
/
pyproject.toml
File metadata and controls
126 lines (116 loc) · 2.93 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
[project]
name = "mobi"
version = "0.4.1"
description = "unpack unencrypted mobi files"
authors = [{ name = "Titusz Pan", email = "tp@py7.de" }]
requires-python = ">=3.9"
readme = "README.md"
license = "GPL-3.0-only"
keywords = [
"mobi",
"mobipocket",
"unpack",
"extract",
"text",
]
classifiers = ["Development Status :: 4 - Beta"]
dependencies = [
"loguru>=0.6",
"standard-imghdr>=3.13.0",
]
[project.urls]
Homepage = "https://github.com/iscc/mobi"
Repository = "https://github.com/iscc/mobi"
[project.scripts]
mobiunpack = "mobi.kindleunpack:main"
[dependency-groups]
dev = [
"pytest",
"ruff",
"pre-commit",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
exclude = [
"tests/",
".git*",
".mypy_cache/",
".pytest_cache/",
".ruff_cache/",
".venv/",
"dist/",
"build/",
"*.egg-info/",
]
[tool.ruff]
line-length = 119
target-version = "py39"
exclude = [
".git",
"__pycache__",
"dist",
"build",
"*.egg-info",
".mypy_cache",
".pytest_cache",
".ruff_cache",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade (limited)
"SIM", # flake8-simplify (limited)
"TID", # flake8-tidy-imports
]
ignore = [
"E501", # line too long
"E402", # module import not at top of file (needed for compatibility code)
"E722", # bare except (needed for compatibility)
"F601", # duplicate dictionary keys (intentional in header definitions)
"F821", # undefined name (false positives from Python 2 compat)
"B006", # mutable data structures for defaults
"B007", # unused loop variable
"B008", # do not perform function calls in argument defaults
"B034", # re.sub positional arguments
"B905", # zip() without explicit strict parameter
"C401", # unnecessary generator
"C414", # unnecessary list call within sorted
"UP008", # super() calls
"UP030", # format strings positional indices
"UP031", # format strings (keep % formatting for now)
"SIM102", # nested if statements
"SIM105", # contextlib.suppress
"SIM108", # simplify if-else
"SIM110", # simplify for loops
"SIM113", # enumerate for loop
"SIM115", # context manager for open
"SIM118", # use key in dict instead of key in dict.keys()
]
[tool.ruff.lint.isort]
known-first-party = ["mobi"]
[tool.mypy]
python_version = "3.7"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
no_strict_optional = true
exclude = [
"build/",
"dist/",
"tests/",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
filterwarnings = [
"ignore:.*'imghdr' is deprecated.*:DeprecationWarning",
]