Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ruff workflow #1023

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading