Skip to content

Commit

Permalink
Refactor unnecessary else / elif when if block has a return s…
Browse files Browse the repository at this point in the history
…tatement (#34)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed Sep 28, 2022
1 parent 6c1b42e commit 21f2da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions durin/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def get_fieldsets(self, request, obj=None):
},
),
]
else:
return super().get_fieldsets(request, obj)
return super().get_fieldsets(request, obj)

def has_change_permission(self, request, obj=None):
"""
Expand Down
3 changes: 1 addition & 2 deletions durin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ def expires_in(self) -> str:
if self.expiry:
td = self.expiry - self.created
return humanize.naturaldelta(td)
else:
return "N/A"
return "N/A"

@property
def has_expired(self) -> bool:
Expand Down

0 comments on commit 21f2da2

Please sign in to comment.