Skip to content

Commit 8578814

Browse files
committed
chore: ruff check
1 parent f270f30 commit 8578814

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

src/pydisgit/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from httpx import AsyncClient
21
import pprint
2+
3+
from httpx import AsyncClient
34
from quart import Quart, Response, request
45
from werkzeug.exceptions import BadRequest
56

6-
from .conf import Config, BoundEnv
7+
from .conf import BoundEnv, Config
78
from .hmac import HmacVerifyMiddleware
89

910
Quart.__annotations__["http_client"] = AsyncClient
@@ -17,7 +18,7 @@
1718
bound = BoundEnv(app.config, app.logger)
1819
app.asgi_app = HmacVerifyMiddleware(app.asgi_app, bound.github_webhook_secret)
1920

20-
from .handlers import router as free_handler_router
21+
from .handlers import router as free_handler_router # noqa: E402, I001
2122

2223
handler_router = free_handler_router.bind(bound, app.logger)
2324

src/pydisgit/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
Configuration for pydisgit
33
"""
44

5-
from typing import Optional
6-
import logging
75
import re
6+
from typing import Optional
87

98

109
class Config:

src/pydisgit/hmac.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import hmac
66
import logging
77
from collections.abc import Callable
8+
89
from hypercorn.typing import Scope
910

1011
logger = logging.getLogger(__name__)

src/pydisgit/util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
from dataclasses import dataclass
2-
from hmac import HMAC
31
import re
4-
from typing import NamedTuple, Optional
2+
from typing import Optional
53

64
__NEWLINE_REGEXP = re.compile(r"<!--(?:.|\n|\r)*?-->[\n|\r]*")
75

src/pydisgit/webhook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Core logic for webhook handling
33
"""
44

5+
import inspect
56
from collections.abc import Callable
67
from dataclasses import dataclass, field
78
from logging import Logger
8-
from typing import Any, Optional, NamedTuple
9-
import inspect
9+
from typing import Any, NamedTuple, Optional
1010

1111
from .conf import BoundEnv
1212
from .util import truncate

0 commit comments

Comments
 (0)