-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
pyproject.toml
147 lines (131 loc) · 3.51 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
143
144
145
146
147
[tool.poetry]
name = "pdf-bot"
version = "1.0.0"
description = "Telegram bot that can do a lot of things related to PDF files."
authors = ["zeshuaro <[email protected]>"]
[tool.poetry.dependencies]
python = "==3.12.7"
Babel = "2.16.0"
google-cloud-datastore = "2.20.1"
humanize = "4.11.0"
img2pdf = "0.5.1"
ocrmypdf = "16.6.0"
pdf2image = "==1.17.0"
"pdfminer.six" = "20240706"
python-telegram-bot = { extras = [
"callback-data",
"rate-limiter",
"webhooks",
], version = "==21.7" }
requests = "2.32.3"
slack-sdk = "3.33.3"
weasyprint = "62.3"
noteshrink = { git = "https://github.com/zeshuaro/noteshrink", rev = "a74a17f7cf3d2eae5811bf970ce88467ba37f51c" }
pdf-diff = { git = "https://github.com/zeshuaro/pdf-diff", rev = "6fe2f136906f1ecc9777c31aa846cd6a287c74b6" }
langdetect = "1.0.9"
loguru = "0.7.2"
sentry-sdk = "2.18.0"
dependency-injector = { git = "https://github.com/anton-petrov/python-dependency-injector", rev = "a245e32e8286d0df34a6a731bf62fa86504ce6aa" }
pdfCropMargins = "==2.1.4"
pycryptodome = "3.21.0"
pydantic = { extras = ["dotenv"], version = "==2.9.2" }
pypdf = "4.3.1"
pikepdf = "9.4.0"
pydantic-settings = "2.6.1"
[tool.poetry.group.dev.dependencies]
pytest = "8.3.3"
pytest-cov = "6.0.0"
pre-commit = "==4.0.1"
mypy = "1.13.0"
types-requests = "2.32.0.20241016"
pytest-asyncio = "0.24.0"
ruff = "==0.6.9"
[build-system]
requires = ["poetry-core==1.9.1"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN101", # MissingTypeSelf
"ANN102", # MissingTypeCls
"ANN401", # DynamicallyTypedExpression
"COM812", # trailing-comma-missing
"FBT", # flake8-boolean-trap
"ISC001", # flake8-implicit-str-concat (conflicts with formatter)
"PD", # pandas-vet
"S603", # subprocess-without-shell-equals-true
# D10* rules are all related to missing docstring
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
]
[tool.ruff.lint.per-file-ignores]
"pdf_bot/language/language_service.py" = [
"RUF001", # AmbiguousUnicodeCharacterString
]
"tests/pdf_processor/test_abstract_pdf_select_and_text_processor.py" = [
"SLF001", # private-member-access
]
"tests/pdf_processor/test_abstract_pdf_text_input_processor.py" = [
"SLF001", # private-member-access
]
"tests/**/*.py" = [
"S101", # AssertUsed
"S105", # HardcodedPasswordString
"PLR2004", # magic-value-comparison
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
warn_unused_configs = true
warn_redundant_casts = true
show_error_codes = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = true
warn_unreachable = true
plugins = ['pydantic.mypy']
[[tool.mypy.overrides]]
module = ['pdf_bot.log.*']
ignore_errors = true
[[tool.mypy.overrides]]
module = [
'weasyprint.*',
'langdetect.*',
'img2pdf.*',
'pdf2image.*',
'pdf_diff.*',
'noteshrink.*',
'google.*',
'pdfCropMargins.*',
]
ignore_missing_imports = true
[tool.coverage.run]
relative_files = true
branch = true
source = ["pdf_bot"]
omit = ['pdf_bot/__main__.py', 'pdf_bot/log/*', "tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"@abstractmethod",
]