diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b92fa57..cc309ef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,7 @@ jobs: tests: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: [ '3.8', @@ -20,12 +21,10 @@ jobs: name: Python ${{ matrix.python-version }} ${{ matrix.post-venv }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - name: Install uv uses: astral-sh/setup-uv@v7 + with: + python-version: ${{ matrix.python-version }} - run: make venv - if: ${{ matrix.post-venv }} run: ${{ matrix.post-venv }} diff --git a/src/flareio/api_client.py b/src/flareio/api_client.py index de108e0..56f2edc 100644 --- a/src/flareio/api_client.py +++ b/src/flareio/api_client.py @@ -21,7 +21,7 @@ _API_DOMAIN_DEFAULT: str = "api.flare.io" -_ALLOWED_API_DOMAINS: frozenset[str] = frozenset( +_ALLOWED_API_DOMAINS: t.FrozenSet[str] = frozenset( { _API_DOMAIN_DEFAULT, "api.eu.flare.io", @@ -37,7 +37,7 @@ def __init__( tenant_id: t.Optional[int] = None, session: t.Optional[requests.Session] = None, api_domain: t.Optional[str] = None, - _auth: AuthBase | None = None, + _auth: t.Optional[AuthBase] = None, _enable_beta_features: bool = False, ) -> None: if not api_key: diff --git a/src/flareio/auth.py b/src/flareio/auth.py index 35d5e1a..7c306f3 100644 --- a/src/flareio/auth.py +++ b/src/flareio/auth.py @@ -1,14 +1,16 @@ from requests import PreparedRequest from requests.auth import AuthBase +import typing as t + class _StaticHeadersAuth(AuthBase): def __init__( self, *, - headers: dict[str, str], + headers: t.Dict[str, str], ) -> None: - self._headers: dict[str, str] = headers + self._headers: t.Dict[str, str] = headers def __call__( self, diff --git a/src/flareio/models.py b/src/flareio/models.py index 653f861..f332b8c 100644 --- a/src/flareio/models.py +++ b/src/flareio/models.py @@ -1,8 +1,10 @@ import dataclasses +import typing as t + @dataclasses.dataclass(frozen=True) class ScrollEventsResult: metadata: dict event: dict - next: str | None + next: t.Optional[str]