Format and lint with ruff (#1263)

This commit is contained in:
Sascha Ißbrücker
2026-01-04 12:13:48 +01:00
committed by GitHub
parent 4d82fefa4e
commit 3b26190df5
178 changed files with 601 additions and 739 deletions

View File

@@ -167,7 +167,9 @@ class TagMergeForm(forms.Form):
try:
target_tag = Tag.objects.get(name__iexact=target_tag_name, owner=self.user)
except Tag.DoesNotExist:
raise forms.ValidationError(f'Tag "{target_tag_name}" does not exist.')
raise forms.ValidationError(
f'Tag "{target_tag_name}" does not exist.'
) from None
return target_tag
@@ -184,7 +186,9 @@ class TagMergeForm(forms.Form):
tag = Tag.objects.get(name__iexact=tag_name, owner=self.user)
merge_tags.append(tag)
except Tag.DoesNotExist:
raise forms.ValidationError(f'Tag "{tag_name}" does not exist.')
raise forms.ValidationError(
f'Tag "{tag_name}" does not exist.'
) from None
target_tag = self.cleaned_data.get("target_tag")
if target_tag and target_tag in merge_tags: