Skip to content

Commit

Permalink
Merge pull request #83 from josh/dependabot/pip/ruff-0.9.1
Browse files Browse the repository at this point in the history
Bump ruff from 0.8.0 to 0.9.1
  • Loading branch information
github-actions[bot] authored Jan 14, 2025
2 parents bcfa9a7 + 38d8f14 commit 5476be2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def save(self, filename: Path) -> None:
feeds_lst = list(self._feeds)

for field, count in self._nonnull_counts().items():
assert (
count >= self._initial_nonnull_counts[field]
), f"{field} non-null count decreased"
assert count >= self._initial_nonnull_counts[field], (
f"{field} non-null count decreased"
)

assert len(set(f.id for f in feeds_lst)) == len(feeds_lst), "Duplicate IDs"

Expand Down Expand Up @@ -284,13 +284,13 @@ def save(self, filename: Path) -> None:
episodes_lst = list(self._episodes)

for field, count in self._nonnull_counts().items():
assert (
count >= self._initial_nonnull_counts[field]
), f"{field} non-null count decreased"
assert count >= self._initial_nonnull_counts[field], (
f"{field} non-null count decreased"
)

assert len(set(e.overcast_url for e in episodes_lst)) == len(
episodes_lst
), "Duplicate Overcast URLs"
assert len(set(e.overcast_url for e in episodes_lst)) == len(episodes_lst), (
"Duplicate Overcast URLs"
)

with filename.open("w") as csvfile:
writer = csv.DictWriter(
Expand Down
12 changes: 6 additions & 6 deletions overcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,12 @@ def _validate(self) -> None:
assert self.title, self.title
assert self.date_published.tzinfo, "published date must be timezone-aware"
assert self.user_updated_at.tzinfo, "updated date must be timezone-aware"
assert self.date_published <= datetime.now(
timezone.utc
), self.date_published
assert self.user_updated_at < datetime.now(
timezone.utc
), self.user_updated_at
assert self.date_published <= datetime.now(timezone.utc), (
self.date_published
)
assert self.user_updated_at < datetime.now(timezone.utc), (
self.user_updated_at
)
except AssertionError as e:
logger.error(e)
if _RAISE_VALIDATION_ERRORS:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ python-dateutil==2.9.0.post0
# via overcast-data (pyproject.toml)
requests==2.32.3
# via overcast-data (pyproject.toml)
ruff==0.8.0
ruff==0.9.1
# via overcast-data (pyproject.toml)
six==1.17.0
# via python-dateutil
Expand Down

0 comments on commit 5476be2

Please sign in to comment.