Skip to content

Commit

Permalink
fix: Ruff workflow (#1023)
Browse files Browse the repository at this point in the history
* fix: Ruff workflow

* fix: Ruff fixes
  • Loading branch information
marksweb authored Jul 2, 2024
1 parent c0c01b0 commit aa2ef9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- run: python -Im pip install --user ruff

- name: Run Ruff
run: ruff --output-format=github .
run: ruff check --output-format=github .
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 aa2ef9a

Please sign in to comment.