Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 15, 2024
1 parent 6d51b89 commit b5b2da0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/django_flyio/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class FlyResponseMiddleware:

def __init__(
self,
get_response: (
Callable[[HttpRequest], HttpResponseBase] | Callable[[HttpRequest], Awaitable[HttpResponseBase]]
),
get_response: Callable[[HttpRequest], HttpResponseBase] | Callable[[HttpRequest], Awaitable[HttpResponseBase]],
) -> None:
self.get_response = get_response
if asyncio.iscoroutinefunction(self.get_response):
Expand Down Expand Up @@ -74,9 +72,7 @@ class FlyReplayMiddleware:

def __init__(
self,
get_response: (
Callable[[HttpRequest], HttpResponseBase] | Callable[[HttpRequest], Awaitable[HttpResponseBase]]
),
get_response: Callable[[HttpRequest], HttpResponseBase] | Callable[[HttpRequest], Awaitable[HttpResponseBase]],
) -> None:
self.get_response = get_response
if asyncio.iscoroutinefunction(self.get_response):
Expand Down
4 changes: 2 additions & 2 deletions src/django_flyio/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def db_for_read(self, model, **hints) -> str: # type: ignore [no-untyped-def]
def db_for_write(self, model, **hints) -> str: # type: ignore [no-untyped-def] # noqa: ARG002
return "default"

def allow_relation(self, obj1, obj2, **hints) -> bool: # type: ignore [no-untyped-def] # pragma: no cover # noqa: ARG002, E501
def allow_relation(self, obj1, obj2, **hints) -> bool: # type: ignore [no-untyped-def] # pragma: no cover # noqa: ARG002
return True

def allow_migrate(self, db, app_label, **hints) -> bool: # type: ignore [no-untyped-def] # pragma: no cover # noqa: ARG002, E501
def allow_migrate(self, db, app_label, **hints) -> bool: # type: ignore [no-untyped-def] # pragma: no cover # noqa: ARG002
return True

0 comments on commit b5b2da0

Please sign in to comment.