11[project ]
22name = " nonebot-plugin-alconna"
33description = " Alconna Adapter for Nonebot"
4- authors = [
5- {name = " RF-Tar-Railt" , email = " rf_tar_railt@qq.com" },
6- ]
4+ authors = [{ name = " RF-Tar-Railt" , email = " rf_tar_railt@qq.com" }]
75dependencies = [
86 " tarina<0.8.0,>=0.7.3" ,
97 " nepattern<1.0,>=0.7.7" ,
@@ -16,12 +14,8 @@ dependencies = [
1614dynamic = [" version" ]
1715requires-python = " >=3.10"
1816readme = " README.md"
19- license = {text = " MIT" }
20- keywords = [
21- " command" ,
22- " alconna" ,
23- " nonebot" ,
24- ]
17+ license = { text = " MIT" }
18+ keywords = [" command" , " alconna" , " nonebot" ]
2519[project .urls ]
2620homepage = " https://github.com/nonebot/plugin-alconna"
2721repository = " https://github.com/nonebot/plugin-alconna"
@@ -58,95 +52,99 @@ target-version = "py39"
5852
5953[tool .ruff .lint ]
6054select = [
61- " F" , # pyflakes
62- " E" , # pycodestyle errors
63- " W" , # pycodestyle warnings
55+ " F" , # pyflakes
56+ " E" , # pycodestyle errors
57+ " W" , # pycodestyle warnings
6458 # "I", # isort
6559 " N" , # PEP8-naming
6660 " UP" , # pyupgrade
6761 " YTT" , # flake8-2020
6862 " ASYNC" , # flake8-async
6963 # "S", # flake8-bandit
70- " BLE" , # flake8-blind-except
64+ " BLE" , # flake8-blind-except
7165 # "FBT", # flake8-boolean-trap
72- " B" , # flake8-bugbear
73- " A" , # flake8-builtins
74- " COM" , # flake8-commas
75- " C4" , # flake8-comprehensions
76- " DTZ" , # flake8-datetimez
77- " T10" , # flake8-debugger
66+ " B" , # flake8-bugbear
67+ " A" , # flake8-builtins
68+ " COM" , # flake8-commas
69+ " C4" , # flake8-comprehensions
70+ " DTZ" , # flake8-datetimez
71+ " T10" , # flake8-debugger
7872 # "FA", # flake8-future-annotations
79- " ISC" , # flake8-implicit-str-concat
80- " ICN" , # flake8-import-conventions
81- " PIE" , # flake8-pie
82- " T20" , # flake8-print
83- " PYI" , # flake8-pyi
84- " Q" , # flake8-quotes
85- " RSE" , # flake8-raise
86- " RET" , # flake8-return
87- " SLOT" , # flake8-slots
88- " SIM" , # flake8-simplify
89- " TID" , # flake8-tidy-imports
73+ " ISC" , # flake8-implicit-str-concat
74+ " ICN" , # flake8-import-conventions
75+ " PIE" , # flake8-pie
76+ " T20" , # flake8-print
77+ " PYI" , # flake8-pyi
78+ " Q" , # flake8-quotes
79+ " RSE" , # flake8-raise
80+ " RET" , # flake8-return
81+ " SLOT" , # flake8-slots
82+ " SIM" , # flake8-simplify
83+ " TID" , # flake8-tidy-imports
9084 # "TC", # flake8-type-checking
9185 # "ARG", # flake8-unused-arguments
92- " PTH" , # flake8-use-pathlib
86+ " PTH" , # flake8-use-pathlib
9387 # "ERA", # eradicate
94- " PD" , # pandas-vet
95- " PGH" , # pygrep-hooks
96- " PL" , # pylint
97- " TRY" , # tryceratops
98- " FLY" , # flynt
99- " FAST" , # FastAPI
100- " PERF" , # Perflint
101- " FURB" , # refurb
102- " RUF" , # Ruff-specific rules
88+ " PD" , # pandas-vet
89+ " PGH" , # pygrep-hooks
90+ " PL" , # pylint
91+ " TRY" , # tryceratops
92+ " FLY" , # flynt
93+ " FAST" , # FastAPI
94+ " PERF" , # Perflint
95+ " FURB" , # refurb
96+ " RUF" , # Ruff-specific rules
10397]
10498ignore = [
10599 " C901" ,
106100 " T201" ,
107101 " E731" ,
108102 " PT023" ,
109- " B010" , # Do not call `setattr` with a constant attribute value.
103+ " B010" , # Do not call `setattr` with a constant attribute value.
110104 " SIM105" , # Use `contextlib.suppress`
111- " B008" , # Do not perform function call in argument defaults
112- " RUF100" , # Unused `noqa` directive
113- " TC003" , # Move xxx into a type-checking block
114- " E402" , # module level import not at top of file
115- " E501" , # 过长的行由 ruff format 处理, 剩余的都是字符串
116- " UP035" , # pyupgrade, 但 typing.Callable 的导入会报错
105+ " B008" , # Do not perform function call in argument defaults
106+ " RUF100" , # Unused `noqa` directive
107+ " TC003" , # Move xxx into a type-checking block
108+ " E402" , # module level import not at top of file
109+ " E501" , # 过长的行由 ruff format 处理, 剩余的都是字符串
110+ " UP035" , # pyupgrade, 但 typing.Callable 的导入会报错
117111 " TRY003" ,
118112 " TRY301" , # 为啥非要把 raise 丢进另外一个 inner fn 里
119113 " BLE001" , # except Exception as e
120114 " PGH003" , # 要求 `# type: ignore` 提供理由,但 pyright 和 mypy 等都不是统一标准。
121- " PLC0414" , # 用 import-as 表示 re-export
122- " N818" , # 要求所有自定义错误以 Error 作后缀,但我们不这么做
123- " RET502" , # return = return None
115+ " PLC0414" , # 用 import-as 表示 re-export
116+ " N818" , # 要求所有自定义错误以 Error 作后缀,但我们不这么做
117+ " RET502" , # return = return None
124118 " RET503" , # 就要 implicit return none
125- " PLC0415" , # 你别管我为什么不在顶层 import
126- " PLC0105" , # 我们已经用 R 表示协变,Q 表示逆变了
127- " PLR0913" , # 参数就那么多的,你用 builder 什么的不是更逆天?
119+ " PLC0415" , # 你别管我为什么不在顶层 import
120+ " PLC0105" , # 我们已经用 R 表示协变,Q 表示逆变了
121+ " PLR0913" , # 参数就那么多的,你用 builder 什么的不是更逆天?
128122 " SIM108" , # 迫真 simplicy
129123 " RUF001" , # String contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
130124 " RUF002" , # Docstring contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
131125 " RUF009" , # 我不想要额外的全局变量。
132126 # "UP038", # instance(..., X | Y) 还是太超前了
133- " RUF003" , # 中文注释里用全角符号怎么你了
134- " SLOT000" , # 动态类型需求,主要是 json5 backend
135- " PLR0911" , " PLR0912" , " PLR0915" , # 复杂度高点怎么你了
136- " PYI019" , # 用 `Self` 替代 `self: T` 的 T
137- " PYI041" , # int 和 float 在运行时的类型没有交集(互不成立 issubclass)
127+ " RUF003" , # 中文注释里用全角符号怎么你了
128+ " SLOT000" , # 动态类型需求,主要是 json5 backend
129+ " PLR0911" ,
130+ " PLR0912" ,
131+ " PLR0915" , # 复杂度高点怎么你了
132+ " PYI019" , # 用 `Self` 替代 `self: T` 的 T
133+ " PYI041" , # int 和 float 在运行时的类型没有交集(互不成立 issubclass)
138134 " PLW2901" , # shallow 怎么你了
139- " S101" , # assert 怎么你了,非要 RuntimeError 吗
135+ " S101" , # assert 怎么你了,非要 RuntimeError 吗
140136 " PLR2004" , # magic number 怎么你了
141- " TRY004" , # 我要抛啥错误我清楚
142- " COM812" , # 强制尾随逗号
143- " TID252" , # 相对导入
144- " ISC001" , # format warning
145- " N801" , # Class name should use CapWords convention
146- " N802" , # Function name should be lowercase
147- " N804" , # First argument of a class method should be named `cls`
148- " N805" , # First argument of a method should be named `self`
149- " N806" , # Variable in function should be lowercase
137+ " TRY004" , # 我要抛啥错误我清楚
138+ " COM812" , # 强制尾随逗号
139+ " TID252" , # 相对导入
140+ " ISC001" , # format warning
141+ " N801" , # Class name should use CapWords convention
142+ " N802" , # Function name should be lowercase
143+ " N804" , # First argument of a class method should be named `cls`
144+ " N805" , # First argument of a method should be named `self`
145+ " N806" , # Variable in function should be lowercase
146+ " PLW0108" ,
147+ " ASYNC240" ,
150148]
151149flake8-quotes = { inline-quotes = " double" , multiline-quotes = " double" }
152150
@@ -167,7 +165,11 @@ reportSelfClsParameterName = false
167165
168166[tool .pdm .scripts ]
169167test = " pytest -v -W ignore ./tests/"
170- format = { composite = [" isort ./src/ ./example/ ./tests/" ," black ./src/ ./example/ ./tests/" ," ruff check ./src/ ./example/ ./tests/" ] }
168+ format = { composite = [
169+ " isort ./src/ ./example/ ./tests/" ,
170+ " black ./src/ ./example/ ./tests/" ,
171+ " ruff check ./src/ ./example/ ./tests/" ,
172+ ] }
171173
172174[tool .pytest .ini_options ]
173175asyncio_mode = " auto"
@@ -189,7 +191,7 @@ dev = [
189191 " nonebot2[httpx,websockets]>=2.4.3" ,
190192 " nonebot-adapter-console<0.10.0,>=0.9.0" ,
191193 " nonebot-adapter-ding>=2.0.0a16" ,
192- " nonebot-adapter-discord>=0 .1.8 " ,
194+ " nonebot-adapter-discord>=1 .1.3 " ,
193195 " nonebot-adapter-dodo>=0.2.1" ,
194196 " nonebot-adapter-feishu>=2.6.2" ,
195197 " nonebot-adapter-kaiheila>=0.3.4" ,
@@ -215,6 +217,7 @@ dev = [
215217 " nonebot-adapter-efchat>=0.1.9.post2" ,
216218 " pytest-asyncio==0.26.0" ,
217219 " nonebot-adapter-bilibili-live>=0.2.4" ,
220+ " nonebot-adapter-yunhu>=0.1.6" ,
218221]
219222test = [
220223 " nonebug>=0.4.3" ,
0 commit comments