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

DM-47789: Update pre-commit dependencies #336

Merged
merged 1 commit into from
Nov 25, 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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.8.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/asottile/blacken-docs
rev: 1.19.0
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==24.4.2]
Expand Down
6 changes: 3 additions & 3 deletions ruff-shared.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ ignore = [
"S607", # using PATH is not a security vulnerability
"SIM102", # sometimes the formatting of nested if statements is clearer
"SIM117", # sometimes nested with contexts are clearer
"TCH001", # we decided to not maintain separate TYPE_CHECKING blocks
"TCH002", # we decided to not maintain separate TYPE_CHECKING blocks
"TCH003", # we decided to not maintain separate TYPE_CHECKING blocks
"TC001", # we decided to not maintain separate TYPE_CHECKING blocks
"TC002", # we decided to not maintain separate TYPE_CHECKING blocks
"TC003", # we decided to not maintain separate TYPE_CHECKING blocks
"TD003", # we don't require issues be created for TODOs
"TID252", # if we're going to use relative imports, use them always
"TRY003", # good general advice but lint is way too aggressive
Expand Down
12 changes: 6 additions & 6 deletions safir-arq/src/safir/arq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

__all__ = [
"ArqJobError",
"JobNotQueued",
"JobNotFound",
"JobResultUnavailable",
"ArqMode",
"ArqQueue",
"JobMetadata",
"JobNotFound",
"JobNotQueued",
"JobResult",
"ArqQueue",
"RedisArqQueue",
"JobResultUnavailable",
"MockArqQueue",
"build_arq_redis_settings",
"RedisArqQueue",
"WorkerSettings",
"build_arq_redis_settings",
]
2 changes: 1 addition & 1 deletion safir-arq/src/safir/arq/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

__all__ = [
"ArqJobError",
"JobNotQueued",
"JobNotFound",
"JobNotQueued",
"JobResultUnavailable",
]

Expand Down
2 changes: 1 addition & 1 deletion safir-arq/src/safir/arq/_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

__all__ = [
"ArqQueue",
"RedisArqQueue",
"MockArqQueue",
"RedisArqQueue",
]


Expand Down
4 changes: 2 additions & 2 deletions safir-arq/src/safir/arq/uws.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"""Name of the arq queue for internal UWS messages."""

__all__ = [
"UWS_QUEUE_NAME",
"T",
"WorkerConfig",
"WorkerError",
"WorkerErrorType",
Expand All @@ -38,8 +40,6 @@
"WorkerTimeoutError",
"WorkerTransientError",
"WorkerUsageError",
"T",
"UWS_QUEUE_NAME",
"build_worker",
]

Expand Down
2 changes: 1 addition & 1 deletion safir-logging/src/safir/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"LogLevel",
"Profile",
"add_log_severity",
"configure_logging",
"configure_alembic_logging",
"configure_logging",
"configure_uvicorn_logging",
]
2 changes: 1 addition & 1 deletion safir/src/safir/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"AlembicConfigError",
"DatabaseInitializationError",
"DatetimeIdCursor",
"PaginationCursor",
"PaginatedLinkData",
"PaginatedList",
"PaginatedQueryRunner",
"PaginationCursor",
"create_async_session",
"create_database_engine",
"datetime_from_db",
Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/database/_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

__all__ = [
"DatetimeIdCursor",
"PaginationCursor",
"PaginatedLinkData",
"PaginatedList",
"PaginatedQueryRunner",
"PaginationCursor",
]


Expand Down
4 changes: 2 additions & 2 deletions safir/src/safir/database/_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


@overload
def retry_async_transaction(__func: RetryF) -> RetryF: ...
def retry_async_transaction(__func: RetryF, /) -> RetryF: ...


@overload
Expand All @@ -38,7 +38,7 @@ def retry_async_transaction(


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

Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/dependencies/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from safir.metrics import EventManager

__all__ = ["EventDependency", "EventMaker", "E"]
__all__ = ["E", "EventDependency", "EventMaker"]

E = TypeVar("E", bound="EventMaker")
"""Generic event maker type."""
Expand Down
26 changes: 13 additions & 13 deletions safir/src/safir/github/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
from pydantic import BaseModel, Field, HttpUrl

__all__ = [
"GitHubRepoOwnerModel",
"GitHubUserModel",
"GitHubRepositoryModel",
"GitHubPullState",
"GitHubPullRequestModel",
"GitHubBlobModel",
"GitHubBranchCommitModel",
"GitHubBranchModel",
"GitHubBlobModel",
"GitHubCheckSuiteStatus",
"GitHubCheckSuiteConclusion",
"GitHubCheckSuiteModel",
"GitHubCheckRunStatus",
"GitHubCheckRunConclusion",
"GitHubCheckRunAnnotationLevel",
"GitHubCheckSuiteId",
"GitHubCheckRunConclusion",
"GitHubCheckRunModel",
"GitHubCheckRunOutput",
"GitHubCheckRunPrInfoModel",
"GitHubCheckRunModel",
"GitHubCheckRunStatus",
"GitHubCheckSuiteConclusion",
"GitHubCheckSuiteId",
"GitHubCheckSuiteModel",
"GitHubCheckSuiteStatus",
"GitHubPullRequestModel",
"GitHubPullState",
"GitHubRepoOwnerModel",
"GitHubRepositoryModel",
"GitHubUserModel",
]


Expand Down
14 changes: 7 additions & 7 deletions safir/src/safir/github/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
)

__all__ = [
"GitHubAppInstallationModel",
"GitHubPushEventModel",
"GitHubAppInstallationEventRepoModel",
"GitHubAppInstallationEventAction",
"GitHubAppInstallationEventModel",
"GitHubAppInstallationEventRepoModel",
"GitHubAppInstallationModel",
"GitHubAppInstallationRepositoriesEventAction",
"GitHubAppInstallationRepositoriesEventModel",
"GitHubPullRequestEventAction",
"GitHubPullRequestEventModel",
"GitHubCheckSuiteEventAction",
"GitHubCheckSuiteEventModel",
"GitHubCheckRunEventAction",
"GitHubCheckRunEventModel",
"GitHubCheckSuiteEventAction",
"GitHubCheckSuiteEventModel",
"GitHubPullRequestEventAction",
"GitHubPullRequestEventModel",
"GitHubPushEventModel",
]


Expand Down
10 changes: 5 additions & 5 deletions safir/src/safir/kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@

__all__ = [
"AIOKafkaParams",
"Compatibility",
"FastStreamBrokerParams",
"IncompatibleSchemaError",
"InvalidAvroNameError",
"InvalidMetadataError",
"KafkaConnectionSettings",
"PlaintextSettings",
"PlaintextSettings",
"PydanticSchemaManager",
"SaslMechanism",
"SaslPlaintextSettings",
"SaslSslSettings",
"SecurityProtocol",
"SslSettings",
"SslSettings",
"PydanticSchemaManager",
"SchemaInfo",
"SchemaManagerSettings",
"SchemaManagerSettings",
"SchemaRegistryClientParams",
"SchemaRegistryClientParams",
"Compatibility",
"SecurityProtocol",
"SslSettings",
"SslSettings",
"UnknownDeserializeError",
"UnknownSchemaError",
]
2 changes: 1 addition & 1 deletion safir/src/safir/kafka/_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
)

__all__ = [
"Compatibility",
"PydanticSchemaManager",
"SchemaInfo",
"Compatibility",
]

P = TypeVar("P", bound=AvroBaseModel)
Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"BaseMetricsConfiguration",
"DisabledMetricsConfiguration",
"DuplicateEventError",
"EventsConfiguration",
"EventManager",
"EventManagerUnintializedError",
"EventMetadata",
"EventPayload",
"EventPublisher",
"EventsConfiguration",
"KafkaEventManager",
"KafkaEventPublisher",
"KafkaMetricsConfiguration",
Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/metrics/_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Metrics exceptions."""

__all__ = [
"EventManagerUnintializedError",
"DuplicateEventError",
"EventManagerUnintializedError",
"KafkaTopicError",
]

Expand Down
4 changes: 2 additions & 2 deletions safir/src/safir/redis/_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
)

__all__ = [
"PydanticRedisStorage",
"EncryptedPydanticRedisStorage",
"DeserializeError",
"EncryptedPydanticRedisStorage",
"PydanticRedisStorage",
]


Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/uws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"ParameterError",
"ParameterParseError",
"ParametersModel",
"UWSApplication",
"UWSAppSettings",
"UWSApplication",
"UWSConfig",
"UWSError",
"UWSJob",
Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/uws/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from arq.cron import Options

__all__ = [
"JOB_STOP_TIMEOUT",
"JOB_RESULT_TIMEOUT",
"JOB_STOP_TIMEOUT",
"UWS_DATABASE_TIMEOUT",
"UWS_EXPIRE_JOBS_SCHEDULE",
]
Expand Down
2 changes: 1 addition & 1 deletion safir/src/safir/uws/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"SyncJobNoResultsError",
"SyncJobTimeoutError",
"TaskError",
"UWSError",
"UnknownJobError",
"UsageError",
"UWSError",
]


Expand Down