Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
68 lines (58 loc) · 1.86 KB
/
Copy pathpyproject.toml
File metadata and controls
68 lines (58 loc) · 1.86 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
[project]
name = "ream"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
"telethon>=1.40.0",
"cryptg>=0.5.0.post0",
"qrcode>=8.2",
]
[dependency-groups]
dev = [
"mypy>=1.16.1", # Type checking
"ruff>=0.12.0", # Linting and formatting
"types-qrcode>=8.2.0.20250914",
]
[tool.ruff.lint]
select = ["ALL"] # Enable all linter rules
preview = true # Enable rules that are in beta
ignore = [
# [suspicious-non-cryptographic-random-usage]
# `random` is not used for cryptographic purposes most of the time,
# so using it instead of the `secrets` module is usually fine.
"S311",
# [flake8-copyright]
# I don't use copyright headers in my code, so this ruleset is unneeded.
"CPY",
# [line-too-long]
# When making the line shorter is possible, ruff's formatter
# automatically takes care of that, so warning about long lines is
# unnecessary.
"E501",
# [missing-todo-author], [missing-todo-link]
# I don't use TODO tags for repository issue tracking, so I don't need
# author and issue links on them.
"TD002",
"TD003",
# [complex-structure], [too-many-branches], [too-many-statements], [too-many-locals], [too-many-return-statements]
# This code heavily uses huge match blocks and if statements, so trying to
# reduce function complexity will actually make the code less readable.
"C901",
"PLR0911",
"PLR0912",
"PLR0914",
"PLR0915",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.mypy]
strict = true # Enforce type annotations
disable_error_code = "name-defined" # Ruff already reports undefined variables
untyped_calls_exclude = ["telethon.helpers"]
[[tool.mypy.overrides]]
module = "telethon.*"
follow_untyped_imports = true
disable_error_code = ["arg-type"]
[[tool.mypy.overrides]]
module = "telethon.client.downloads"
follow_untyped_imports = false