/
pyproject.toml
167 lines (150 loc) · 3.95 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "bgmi"
version = "4.5.0"
description = 'BGmi is a cli tool for subscribed bangumi.'
authors = ["RicterZ <ricterzheng@gmail.com>"]
readme = 'README.md'
license = 'MIT'
maintainers = ["Trim21 <i@trim21.me>"]
homepage = 'https://github.com/BGmi/BGmi'
repository = 'https://github.com/BGmi/BGmi'
keywords = ['bangumi', 'bgmi', 'feed']
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Other Audience',
'Natural Language :: Chinese (Traditional)',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]
packages = [{ include = "bgmi" }]
[tool.poetry-plugin-bump]
commit_msg = 'bump: v{version}'
tag_name = 'v{version}'
[tool.poetry.scripts]
bgmi = 'bgmi.main:main'
bgmi_http = 'bgmi.front.server:main'
[tool.poetry.plugins] # entry-points
[tool.poetry.plugins."bgmi.downloader"]
"aria2-rpc" = 'bgmi.downloader:Aria2DownloadRPC'
"transmission-rpc" = 'bgmi.downloader:TransmissionRPC'
"deluge-rpc" = 'bgmi.downloader:DelugeRPC'
"qbittorrent-webapi" = 'bgmi.downloader:QBittorrentWebAPI'
[tool.poetry.dependencies]
python = "^3.8.0"
beautifulsoup4 = '==4.12.3'
requests = '==2.31.0'
tornado = '==6.4'
icalendar = '==5.0.12'
peewee = '==3.17.3'
wcwidth = "^0.2.13"
pydantic = "==1.10.15"
stevedore = "==5.2.0"
filetype = "1.2.0"
strsimpy = "0.2.1"
tomlkit = "0.12.4"
strenum = "0.4.15"
anime-episode-parser = "0.0.12"
semver = "3.0.2"
loguru = "0.7.2"
click = "8.1.7"
# RPC library
transmission-rpc = "==7.0.3"
qbittorrent-api = "==2024.3.60"
pycomplete = "0.4.0"
yarl = "^1.9.4"
[tool.poetry.dev-dependencies]
# tests
coverage = { version = "==7.4.4", extras = ['toml'] }
pytest = "==8.1.1"
pytest-github-actions-annotate-failures = "==0.2.0"
requests-cache = "==1.2.0"
# lint
pre-commit = { version = '3.7.0', python = "^3.9" }
mypy = "==1.9.0"
# stubs
types-requests = "==2.31.0.20240406"
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'if __name__ == "__main__":',
'if typing.TYPE_CHECKING:',
'raise NotImplementedError',
'if os.getenv("DEBUG"):',
'if os.getenv("DEBUG_SCRIPT"):',
'if os.environ.get("DEBUG"):',
]
[tool.pytest.ini_options]
addopts = '-v --durations=10'
junit_family = 'legacy'
[tool.isort]
default_section = 'THIRDPARTY'
known_first_party = 'bgmi'
length_sort = false
line_length = 120
multi_line_output = 3
no_lines_before = 'LOCALFOLDER'
use_parentheses = true
include_trailing_comma = true
[tool.mypy]
disallow_untyped_defs = true
ignore_missing_imports = true
warn_return_any = true
warn_unused_configs = true
show_error_codes = true
pretty = true
plugins = ['pydantic.mypy']
[[tool.mypy.overrides]]
module = [
"bgmi.downloader.*",
"bgmi.website.mikan",
"bgmi.website.bangumi_moe",
"bgmi.website.share_dmhy",
]
disallow_untyped_defs = false
[tool.pylint]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.messages_control]
extension-pkg-whitelist = ['pydantic']
disable = [
'fixme',
"consider-using-f-string",
"cell-var-from-loop",
"missing-function-docstring",
"missing-class-docstring",
"missing-module-docstring",
'raise-missing-from',
'invalid-name',
'too-many-locals',
'duplicate-code',
'too-few-public-methods',
'unused-argument',
'no-else-return',
'assignment-from-none',
'unused-variable',
'broad-except',
'too-many-nested-blocks',
'too-many-branches',
'redefined-outer-name',
'too-many-return-statements',
'too-many-statements',
'too-many-arguments',
'not-an-iterable',
'redefined-builtin',
]
[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310']
[tool.ruff]
line-length = 120
target-version = 'py38'