Skip to content

Commit

Permalink
Ruff: fix RET
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Jul 3, 2024
1 parent 7cbf937 commit 8b23289
Show file tree
Hide file tree
Showing 202 changed files with 1,387 additions and 1,872 deletions.
15 changes: 7 additions & 8 deletions dojo/announcement/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ def dismiss_announcement(request):
extra_tags="alert-success",
)
return HttpResponseRedirect("dashboard")
else:
messages.add_message(
request,
messages.ERROR,
_("Failed to remove announcement."),
extra_tags="alert-danger",
)
return render(request, "dojo/dismiss_announcement.html")
messages.add_message(
request,
messages.ERROR,
_("Failed to remove announcement."),
extra_tags="alert-danger",
)
return render(request, "dojo/dismiss_announcement.html")
return render(request, "dojo/dismiss_announcement.html")
3 changes: 1 addition & 2 deletions dojo/api_v2/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def delete_preview(self, request, pk=None):
def flatten(elem):
if isinstance(elem, list):
return itertools.chain.from_iterable(map(flatten, elem))
else:
return [elem]
return [elem]

rels = [
{
Expand Down
Loading

0 comments on commit 8b23289

Please sign in to comment.