Skip to content

Commit

Permalink
lint and upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Nov 25, 2024
1 parent 481df47 commit 324fc28
Show file tree
Hide file tree
Showing 5 changed files with 510 additions and 507 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: check-yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
rev: v0.8.0
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 2 additions & 2 deletions aggrec/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from contextlib import suppress
from datetime import datetime, timezone
from enum import Enum
from typing import Annotated, Dict, List
from typing import Annotated
from urllib.parse import urljoin

import bson
Expand Down Expand Up @@ -103,7 +103,7 @@ def from_db_model(cls, metadata: AggregateMetadata, settings: Settings):
)


def get_http_headers(request: Request, covered_components_headers: List[str]) -> Dict[str, str]:
def get_http_headers(request: Request, covered_components_headers: list[str]) -> dict[str, str]:
"""Get dictionary of relevant metadata HTTP headers"""

relevant_headers = set([header.lower() for header in METADATA_HTTP_HEADERS])
Expand Down
6 changes: 3 additions & 3 deletions aggrec/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import datetime, timezone
from typing import Annotated, Tuple, Type
from typing import Annotated

from pydantic import AnyHttpUrl, BaseModel, DirectoryPath, Field, UrlConstraints
from pydantic_core import Url
Expand Down Expand Up @@ -57,10 +57,10 @@ class Settings(BaseSettings):
@classmethod
def settings_customise_sources(
cls,
settings_cls: Type[BaseSettings],
settings_cls: type[BaseSettings],
init_settings: PydanticBaseSettingsSource,
env_settings: PydanticBaseSettingsSource,
dotenv_settings: PydanticBaseSettingsSource,
file_secret_settings: PydanticBaseSettingsSource,
) -> Tuple[PydanticBaseSettingsSource, ...]:
) -> tuple[PydanticBaseSettingsSource, ...]:
return (TomlConfigSettingsSource(settings_cls),)
Loading

0 comments on commit 324fc28

Please sign in to comment.