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

[pre-commit.ci] pre-commit autoupdate #1018

Merged
merged 2 commits into from
Jan 19, 2025
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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down
6 changes: 2 additions & 4 deletions src/apscheduler/_schedulers/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,7 @@ async def run_until_stopped(
"""Run the scheduler until explicitly stopped."""
if self._state is not RunState.stopped:
raise RuntimeError(
f'Cannot start the scheduler when it is in the "{self._state}" '
f"state"
f'Cannot start the scheduler when it is in the "{self._state}" state'
)

self._state = RunState.starting
Expand Down Expand Up @@ -953,8 +952,7 @@ async def extend_schedule_leases(schedules: Sequence[Schedule]) -> None:
extend_schedule_leases,
schedules,
name=(
f"Scheduler {self.identity!r} schedule lease extension "
f"loop"
f"Scheduler {self.identity!r} schedule lease extension loop"
),
)
exit_stack.callback(tg.cancel_scope.cancel)
Expand Down
2 changes: 1 addition & 1 deletion src/apscheduler/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def require_state_version(
if state["version"] > max_version:
raise DeserializationError(
f"{trigger.__class__.__name__} received a serialized state with "
f'version {state["version"]}, but it only supports up to version '
f"version {state['version']}, but it only supports up to version "
f"{max_version}. This can happen when an older version of APScheduler "
f"is being used with a data store that was previously used with a "
f"newer APScheduler version."
Expand Down
2 changes: 1 addition & 1 deletion src/apscheduler/triggers/calendarinterval.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ def __repr__(self) -> str:
fields.append(f"end_date='{self.end_date}'")

fields.append(f"timezone={timezone_repr(self.timezone)!r}")
return f'{self.__class__.__name__}({", ".join(fields)})'
return f"{self.__class__.__name__}({', '.join(fields)})"
2 changes: 1 addition & 1 deletion src/apscheduler/triggers/cron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def __repr__(self) -> str:
fields.append(f"end_time={self.end_time.isoformat()!r}")

fields.append(f"timezone={timezone_repr(self.timezone)!r}")
return f'CronTrigger({", ".join(fields)})'
return f"CronTrigger({', '.join(fields)})"


def datetime_ceil(dateval: datetime) -> datetime:
Expand Down
2 changes: 1 addition & 1 deletion src/apscheduler/triggers/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ def __repr__(self) -> str:
if self.end_time:
fields.append(f"end_time='{self.end_time}'")

return f'{self.__class__.__name__}({", ".join(fields)})'
return f"{self.__class__.__name__}({', '.join(fields)})"
6 changes: 3 additions & 3 deletions tests/test_schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,9 +1058,9 @@ def test_interface_parity(self) -> None:
sync_args[param.kind].append(param)

for kind, args in async_args.items():
assert (
args == sync_args[kind]
), f"Parameter mismatch for {attrname}(): {args} != {sync_args[kind]}"
assert args == sync_args[kind], (
f"Parameter mismatch for {attrname}(): {args} != {sync_args[kind]}"
)

def test_repr(self) -> None:
scheduler = Scheduler(identity="my identity")
Expand Down
Loading