Skip to content

Commit

Permalink
fix: Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed Jul 2, 2024
1 parent 309964c commit 912dc86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions core/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def ical_uid(self):
def date_is_approximate(self):
if not self.date:
return True
if not all((self.date.year, self.date.month, self.date.day)):
return True
return False
return not all((self.date.year, self.date.month, self.date.day))

@property
def lnglat(self):
Expand Down
4 changes: 2 additions & 2 deletions djangogirls/utils/sanitize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def sanitize(value, output_type):
"""
# pylint: disable=no-else-return

if output_type == bool:
if output_type is bool:
return sanitize_bool(value)
elif output_type == int:
elif output_type is int:
return sanitize_int(value)
# pylint: enable=no-else-return
# unrecognised/unsupported output_type. just return what we got..
Expand Down

0 comments on commit 912dc86

Please sign in to comment.