Skip to content

Commit

Permalink
Merge pull request #1117 from johannaengland/pre-commit/upgrade-ruff
Browse files Browse the repository at this point in the history
Upgrade ruff in pre-commit to 0.9.1
  • Loading branch information
hmpf authored Jan 13, 2025
2 parents f7e519a + 11dec46 commit 184241c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
exclude: &exclude_pattern '^changelog.d/'
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
# Run the linter
- id: ruff
Expand Down
6 changes: 3 additions & 3 deletions src/argus/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ class Meta:
# called when subclass is constructing itself
def __init_subclass__(cls, **kwargs):
assert isinstance(getattr(cls, "FORMS", None), dict), f"{cls.__name__}.FORMS must be a dictionary"
assert isinstance(
getattr(cls, "_FIELD_DEFAULTS", None), dict
), f"{cls.__name__}._FIELD_DEFAULTS must be a dictionary"
assert isinstance(getattr(cls, "_FIELD_DEFAULTS", None), dict), (
f"{cls.__name__}._FIELD_DEFAULTS must be a dictionary"
)

super().__init_subclass__(**kwargs)
cls.NAMESPACES[cls._namespace] = cls
Expand Down
2 changes: 1 addition & 1 deletion src/argus/notificationprofile/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_filters(self, notification_profile: NotificationProfile):
get_filters.short_description = "Filters"

def get_destination_media(self, notification_profile: NotificationProfile):
return f'{" ".join(str(x) for x in set([destination.media.name for destination in notification_profile.destinations.all()]))}'
return f"{' '.join(str(x) for x in set([destination.media.name for destination in notification_profile.destinations.all()]))}"

get_destination_media.short_description = "Media"

Expand Down

0 comments on commit 184241c

Please sign in to comment.