Skip to content

Commit

Permalink
Ruff: add and fix RET (#10111)
Browse files Browse the repository at this point in the history
* Ruff: add RET

* Ruff: fix RET

* move docstring
  • Loading branch information
kiblik authored Sep 17, 2024
1 parent b92a8d0 commit 22a0ffe
Show file tree
Hide file tree
Showing 205 changed files with 1,438 additions and 1,929 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 22a0ffe

Please sign in to comment.