Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.13.0
rev: 1.18.0
hooks:
- id: django-upgrade
language_version: python3.8
args: [--target-version, "3.2"]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
hooks:
- id: ruff
alias: autoformat
args: ["--fix"]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black
language_version: python3.8
args: [--target-version, "py37"]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# lint the following with prettier:
Expand Down
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
Loading