Skip to content

Commit

Permalink
fix for 3.9?
Browse files Browse the repository at this point in the history
  • Loading branch information
pipliggins committed Nov 28, 2024
1 parent 4956466 commit 6c4840d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/adtl/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from datetime import datetime
from functools import lru_cache
from pathlib import Path
from typing import Any, Callable, Iterable, Literal
from typing import Any, Callable, Iterable, Literal, Union

import fastjsonschema
import pint
Expand All @@ -29,8 +29,8 @@
DEFAULT_DATE_FORMAT = "%Y-%m-%d"

StrDict = dict[str, Any]
Rule = str | StrDict
Context = dict[str, bool | int | str | list[str]] | None
Rule = Union[str, StrDict]
Context = Union[dict[str, bool | int | str | list[str]], None]


def get_value(row: StrDict, rule: Rule, ctx: Context = None) -> Any:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import collections
import contextlib
import io
Expand Down
2 changes: 2 additions & 0 deletions tests/test_python_interface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from pathlib import Path

import adtl
Expand Down
2 changes: 2 additions & 0 deletions tests/test_transformations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from datetime import datetime

import pytest
Expand Down

0 comments on commit 6c4840d

Please sign in to comment.