Skip to content

Commit e0fb814

Browse files
authored
Merge pull request #33 from Flared/xavier/fix-old-python-linting
Ensure CI runs on the correct version of python and fix typing issues
2 parents 1424d8f + f4243c4 commit e0fb814

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ jobs:
44
tests:
55
runs-on: ubuntu-latest
66
strategy:
7+
fail-fast: false
78
matrix:
89
python-version: [
910
'3.8',
@@ -20,12 +21,10 @@ jobs:
2021
name: Python ${{ matrix.python-version }} ${{ matrix.post-venv }}
2122
steps:
2223
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v5
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
architecture: x64
2724
- name: Install uv
2825
uses: astral-sh/setup-uv@v7
26+
with:
27+
python-version: ${{ matrix.python-version }}
2928
- run: make venv
3029
- if: ${{ matrix.post-venv }}
3130
run: ${{ matrix.post-venv }}

src/flareio/api_client.py

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

2222

2323
_API_DOMAIN_DEFAULT: str = "api.flare.io"
24-
_ALLOWED_API_DOMAINS: frozenset[str] = frozenset(
24+
_ALLOWED_API_DOMAINS: t.FrozenSet[str] = frozenset(
2525
{
2626
_API_DOMAIN_DEFAULT,
2727
"api.eu.flare.io",
@@ -37,7 +37,7 @@ def __init__(
3737
tenant_id: t.Optional[int] = None,
3838
session: t.Optional[requests.Session] = None,
3939
api_domain: t.Optional[str] = None,
40-
_auth: AuthBase | None = None,
40+
_auth: t.Optional[AuthBase] = None,
4141
_enable_beta_features: bool = False,
4242
) -> None:
4343
if not api_key:

src/flareio/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
from requests import PreparedRequest
22
from requests.auth import AuthBase
33

4+
import typing as t
5+
46

57
class _StaticHeadersAuth(AuthBase):
68
def __init__(
79
self,
810
*,
9-
headers: dict[str, str],
11+
headers: t.Dict[str, str],
1012
) -> None:
11-
self._headers: dict[str, str] = headers
13+
self._headers: t.Dict[str, str] = headers
1214

1315
def __call__(
1416
self,

src/flareio/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import dataclasses
22

3+
import typing as t
4+
35

46
@dataclasses.dataclass(frozen=True)
57
class ScrollEventsResult:
68
metadata: dict
79
event: dict
8-
next: str | None
10+
next: t.Optional[str]

0 commit comments

Comments
 (0)