Skip to content

Commit 3bc6a7d

Browse files
committed
Update pre-commit dependencies
Update pre-commit dependencies, apply fixes from Ruff 0.8.0, and adjust the shared Ruff configuration file for some renamings of diagnostic codes. Add a positional-only parameter separator in one place detected by Ruff.
1 parent 50b38d5 commit 3bc6a7d

File tree

21 files changed

+54
-54
lines changed

21 files changed

+54
-54
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ repos:
88
- id: trailing-whitespace
99

1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.7.0
11+
rev: v0.8.0
1212
hooks:
1313
- id: ruff
1414
args: [--fix, --exit-non-zero-on-fix]
1515
- id: ruff-format
1616

1717
- repo: https://github.com/asottile/blacken-docs
18-
rev: 1.19.0
18+
rev: 1.19.1
1919
hooks:
2020
- id: blacken-docs
2121
additional_dependencies: [black==24.4.2]

ruff-shared.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ ignore = [
5858
"S607", # using PATH is not a security vulnerability
5959
"SIM102", # sometimes the formatting of nested if statements is clearer
6060
"SIM117", # sometimes nested with contexts are clearer
61-
"TCH001", # we decided to not maintain separate TYPE_CHECKING blocks
62-
"TCH002", # we decided to not maintain separate TYPE_CHECKING blocks
63-
"TCH003", # we decided to not maintain separate TYPE_CHECKING blocks
61+
"TC001", # we decided to not maintain separate TYPE_CHECKING blocks
62+
"TC002", # we decided to not maintain separate TYPE_CHECKING blocks
63+
"TC003", # we decided to not maintain separate TYPE_CHECKING blocks
6464
"TD003", # we don't require issues be created for TODOs
6565
"TID252", # if we're going to use relative imports, use them always
6666
"TRY003", # good general advice but lint is way too aggressive

safir-arq/src/safir/arq/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
__all__ = [
1414
"ArqJobError",
15-
"JobNotQueued",
16-
"JobNotFound",
17-
"JobResultUnavailable",
1815
"ArqMode",
16+
"ArqQueue",
1917
"JobMetadata",
18+
"JobNotFound",
19+
"JobNotQueued",
2020
"JobResult",
21-
"ArqQueue",
22-
"RedisArqQueue",
21+
"JobResultUnavailable",
2322
"MockArqQueue",
24-
"build_arq_redis_settings",
23+
"RedisArqQueue",
2524
"WorkerSettings",
25+
"build_arq_redis_settings",
2626
]

safir-arq/src/safir/arq/_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
__all__ = [
66
"ArqJobError",
7-
"JobNotQueued",
87
"JobNotFound",
8+
"JobNotQueued",
99
"JobResultUnavailable",
1010
]
1111

safir-arq/src/safir/arq/_queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
__all__ = [
2020
"ArqQueue",
21-
"RedisArqQueue",
2221
"MockArqQueue",
22+
"RedisArqQueue",
2323
]
2424

2525

safir-arq/src/safir/arq/uws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"""Name of the arq queue for internal UWS messages."""
3030

3131
__all__ = [
32+
"UWS_QUEUE_NAME",
33+
"T",
3234
"WorkerConfig",
3335
"WorkerError",
3436
"WorkerErrorType",
@@ -38,8 +40,6 @@
3840
"WorkerTimeoutError",
3941
"WorkerTransientError",
4042
"WorkerUsageError",
41-
"T",
42-
"UWS_QUEUE_NAME",
4343
"build_worker",
4444
]
4545

safir-logging/src/safir/logging/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"LogLevel",
1010
"Profile",
1111
"add_log_severity",
12-
"configure_logging",
1312
"configure_alembic_logging",
13+
"configure_logging",
1414
"configure_uvicorn_logging",
1515
]

safir/src/safir/database/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"AlembicConfigError",
3030
"DatabaseInitializationError",
3131
"DatetimeIdCursor",
32-
"PaginationCursor",
3332
"PaginatedLinkData",
3433
"PaginatedList",
3534
"PaginatedQueryRunner",
35+
"PaginationCursor",
3636
"create_async_session",
3737
"create_database_engine",
3838
"datetime_from_db",

safir/src/safir/database/_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232

3333
__all__ = [
3434
"DatetimeIdCursor",
35-
"PaginationCursor",
3635
"PaginatedLinkData",
3736
"PaginatedList",
3837
"PaginatedQueryRunner",
38+
"PaginationCursor",
3939
]
4040

4141

safir/src/safir/database/_retry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
@overload
31-
def retry_async_transaction(__func: RetryF) -> RetryF: ...
31+
def retry_async_transaction(__func: RetryF, /) -> RetryF: ...
3232

3333

3434
@overload
@@ -38,7 +38,7 @@ def retry_async_transaction(
3838

3939

4040
def retry_async_transaction(
41-
__func: RetryF | None = None, *, delay: float = 0.5, max_tries: int = 3
41+
__func: RetryF | None = None, /, *, delay: float = 0.5, max_tries: int = 3
4242
) -> RetryF | Callable[[RetryF], RetryF]:
4343
"""Retry if a transaction failed.
4444

safir/src/safir/dependencies/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from safir.metrics import EventManager
99

10-
__all__ = ["EventDependency", "EventMaker", "E"]
10+
__all__ = ["E", "EventDependency", "EventMaker"]
1111

1212
E = TypeVar("E", bound="EventMaker")
1313
"""Generic event maker type."""

safir/src/safir/github/models.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@
88
from pydantic import BaseModel, Field, HttpUrl
99

1010
__all__ = [
11-
"GitHubRepoOwnerModel",
12-
"GitHubUserModel",
13-
"GitHubRepositoryModel",
14-
"GitHubPullState",
15-
"GitHubPullRequestModel",
11+
"GitHubBlobModel",
1612
"GitHubBranchCommitModel",
1713
"GitHubBranchModel",
18-
"GitHubBlobModel",
19-
"GitHubCheckSuiteStatus",
20-
"GitHubCheckSuiteConclusion",
21-
"GitHubCheckSuiteModel",
22-
"GitHubCheckRunStatus",
23-
"GitHubCheckRunConclusion",
2414
"GitHubCheckRunAnnotationLevel",
25-
"GitHubCheckSuiteId",
15+
"GitHubCheckRunConclusion",
16+
"GitHubCheckRunModel",
2617
"GitHubCheckRunOutput",
2718
"GitHubCheckRunPrInfoModel",
28-
"GitHubCheckRunModel",
19+
"GitHubCheckRunStatus",
20+
"GitHubCheckSuiteConclusion",
21+
"GitHubCheckSuiteId",
22+
"GitHubCheckSuiteModel",
23+
"GitHubCheckSuiteStatus",
24+
"GitHubPullRequestModel",
25+
"GitHubPullState",
26+
"GitHubRepoOwnerModel",
27+
"GitHubRepositoryModel",
28+
"GitHubUserModel",
2929
]
3030

3131

safir/src/safir/github/webhooks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
)
1515

1616
__all__ = [
17-
"GitHubAppInstallationModel",
18-
"GitHubPushEventModel",
19-
"GitHubAppInstallationEventRepoModel",
2017
"GitHubAppInstallationEventAction",
2118
"GitHubAppInstallationEventModel",
19+
"GitHubAppInstallationEventRepoModel",
20+
"GitHubAppInstallationModel",
2221
"GitHubAppInstallationRepositoriesEventAction",
2322
"GitHubAppInstallationRepositoriesEventModel",
24-
"GitHubPullRequestEventAction",
25-
"GitHubPullRequestEventModel",
26-
"GitHubCheckSuiteEventAction",
27-
"GitHubCheckSuiteEventModel",
2823
"GitHubCheckRunEventAction",
2924
"GitHubCheckRunEventModel",
25+
"GitHubCheckSuiteEventAction",
26+
"GitHubCheckSuiteEventModel",
27+
"GitHubPullRequestEventAction",
28+
"GitHubPullRequestEventModel",
29+
"GitHubPushEventModel",
3030
]
3131

3232

safir/src/safir/kafka/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424

2525
__all__ = [
2626
"AIOKafkaParams",
27+
"Compatibility",
2728
"FastStreamBrokerParams",
2829
"IncompatibleSchemaError",
2930
"InvalidAvroNameError",
3031
"InvalidMetadataError",
3132
"KafkaConnectionSettings",
3233
"PlaintextSettings",
3334
"PlaintextSettings",
35+
"PydanticSchemaManager",
3436
"SaslMechanism",
3537
"SaslPlaintextSettings",
3638
"SaslSslSettings",
37-
"SecurityProtocol",
38-
"SslSettings",
39-
"SslSettings",
40-
"PydanticSchemaManager",
4139
"SchemaInfo",
4240
"SchemaManagerSettings",
4341
"SchemaManagerSettings",
4442
"SchemaRegistryClientParams",
4543
"SchemaRegistryClientParams",
46-
"Compatibility",
44+
"SecurityProtocol",
45+
"SslSettings",
46+
"SslSettings",
4747
"UnknownDeserializeError",
4848
"UnknownSchemaError",
4949
]

safir/src/safir/kafka/_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
)
3030

3131
__all__ = [
32+
"Compatibility",
3233
"PydanticSchemaManager",
3334
"SchemaInfo",
34-
"Compatibility",
3535
]
3636

3737
P = TypeVar("P", bound=AvroBaseModel)

safir/src/safir/metrics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"BaseMetricsConfiguration",
2626
"DisabledMetricsConfiguration",
2727
"DuplicateEventError",
28-
"EventsConfiguration",
2928
"EventManager",
3029
"EventManagerUnintializedError",
3130
"EventMetadata",
3231
"EventPayload",
3332
"EventPublisher",
33+
"EventsConfiguration",
3434
"KafkaEventManager",
3535
"KafkaEventPublisher",
3636
"KafkaMetricsConfiguration",

safir/src/safir/metrics/_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Metrics exceptions."""
22

33
__all__ = [
4-
"EventManagerUnintializedError",
54
"DuplicateEventError",
5+
"EventManagerUnintializedError",
66
"KafkaTopicError",
77
]
88

safir/src/safir/redis/_storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
)
2424

2525
__all__ = [
26-
"PydanticRedisStorage",
27-
"EncryptedPydanticRedisStorage",
2826
"DeserializeError",
27+
"EncryptedPydanticRedisStorage",
28+
"PydanticRedisStorage",
2929
]
3030

3131

safir/src/safir/uws/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"ParameterError",
2828
"ParameterParseError",
2929
"ParametersModel",
30-
"UWSApplication",
3130
"UWSAppSettings",
31+
"UWSApplication",
3232
"UWSConfig",
3333
"UWSError",
3434
"UWSJob",

safir/src/safir/uws/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from arq.cron import Options
88

99
__all__ = [
10-
"JOB_STOP_TIMEOUT",
1110
"JOB_RESULT_TIMEOUT",
11+
"JOB_STOP_TIMEOUT",
1212
"UWS_DATABASE_TIMEOUT",
1313
"UWS_EXPIRE_JOBS_SCHEDULE",
1414
]

safir/src/safir/uws/_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"SyncJobNoResultsError",
3333
"SyncJobTimeoutError",
3434
"TaskError",
35+
"UWSError",
3536
"UnknownJobError",
3637
"UsageError",
37-
"UWSError",
3838
]
3939

4040

0 commit comments

Comments
 (0)