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 #1371

Merged
merged 2 commits into from
Oct 1, 2024
Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
args: ["--markdown-linebreak-ext=md"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff
- id: ruff-format
Expand Down
4 changes: 2 additions & 2 deletions applications/admin/application/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ApplicationSectionInlineAdminForm(forms.ModelForm):
suitable_days_of_the_week = forms.CharField()

def __init__(self, *args, **kwargs) -> None:
instance: ApplicationSection | None = kwargs.get("instance", None)
instance: ApplicationSection | None = kwargs.get("instance")
if instance:
kwargs.setdefault("initial", {})
kwargs["initial"]["status"] = instance.status
Expand Down Expand Up @@ -70,7 +70,7 @@ class ApplicationAdminForm(forms.ModelForm):
)

def __init__(self, *args, **kwargs) -> None:
instance: Application | None = kwargs.get("instance", None)
instance: Application | None = kwargs.get("instance")
if instance is not None:
kwargs.setdefault("initial", {})
kwargs["initial"]["status"] = ApplicationStatusChoice(instance.status).label
Expand Down
2 changes: 1 addition & 1 deletion applications/admin/application_round/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApplicationRoundAdminForm(forms.ModelForm):
)

def __init__(self, *args: Any, **kwargs: Any) -> None:
instance: ApplicationRound | None = kwargs.get("instance", None)
instance: ApplicationRound | None = kwargs.get("instance")
if instance:
kwargs.setdefault("initial", {})
kwargs["initial"]["status"] = ApplicationRoundStatusChoice(instance.status).label
Expand Down
4 changes: 2 additions & 2 deletions applications/admin/application_section/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SuitableTimeRangeInlineAdminForm(forms.ModelForm):
)

def __init__(self, *args, **kwargs) -> None:
instance: SuitableTimeRange | None = kwargs.get("instance", None)
instance: SuitableTimeRange | None = kwargs.get("instance")
if instance:
kwargs.setdefault("initial", {})
kwargs["initial"]["fulfilled"] = instance.fulfilled
Expand Down Expand Up @@ -105,7 +105,7 @@ class ApplicationSectionAdminForm(forms.ModelForm):
)

def __init__(self, *args, **kwargs) -> None:
instance: ApplicationSection | None = kwargs.get("instance", None)
instance: ApplicationSection | None = kwargs.get("instance")
if instance:
kwargs.setdefault("initial", {})
kwargs["initial"]["status"] = ApplicationSectionStatusChoice(instance.status).label
Expand Down
2 changes: 1 addition & 1 deletion merchants/admin/payment_merchant.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Meta:

def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
instance: PaymentMerchant | None = kwargs.get("instance", None)
instance: PaymentMerchant | None = kwargs.get("instance")
if instance and instance.id:
merchant_info = VerkkokauppaAPIClient.get_merchant(merchant_uuid=instance.id)
if merchant_info is None:
Expand Down
2 changes: 1 addition & 1 deletion merchants/admin/payment_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Meta:
def __init__(self, *args, **kwargs) -> None:
"""Add reservation and reservation unit to the reservation field help text."""
super().__init__(*args, **kwargs)
payment_order: PaymentOrder | None = kwargs.get("instance", None)
payment_order: PaymentOrder | None = kwargs.get("instance")
if payment_order and payment_order.id and payment_order.reservation:
self.fields["reservation"].help_text += (
"<br>" + _("Reservation") + f": {payment_order.reservation.id}"
Expand Down