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

lint and upgrade #122

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -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
Loading