Skip to content

Commit 0f6a059

Browse files
committed
chore: format
1 parent 280f255 commit 0f6a059

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

astrbot/dashboard/server.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@
4242
from .routes.subagent import SubAgentRoute
4343
from .routes.t2i import T2iRoute
4444

45-
_RATE_LIMITED_ENDPOINTS: frozenset = frozenset({
46-
"/api/auth/totp/disable",
47-
"/api/auth/totp/setup",
48-
"/api/auth/login",
49-
"/api/auth/totp/verify-setup",
50-
})
45+
_RATE_LIMITED_ENDPOINTS: frozenset = frozenset(
46+
{
47+
"/api/auth/totp/disable",
48+
"/api/auth/totp/setup",
49+
"/api/auth/login",
50+
"/api/auth/totp/verify-setup",
51+
}
52+
)
5153

5254

5355
class _AuthRateLimiter:
@@ -96,13 +98,15 @@ def _match_registered_web_api(registered_web_apis, subpath: str, method: str):
9698
if request_method not in allowed_methods:
9799
continue
98100

99-
url_map = Map([
100-
Rule(
101-
_normalize_plugin_api_route(route),
102-
endpoint="plugin_api",
103-
methods=allowed_methods,
104-
),
105-
])
101+
url_map = Map(
102+
[
103+
Rule(
104+
_normalize_plugin_api_route(route),
105+
endpoint="plugin_api",
106+
methods=allowed_methods,
107+
),
108+
]
109+
)
106110
try:
107111
_, path_values = url_map.bind("").match(
108112
request_path,

0 commit comments

Comments
 (0)