Skip to content

Commit 7e870d0

Browse files
committed
Fix pypy workflow
Fix invalid import breaking type hint and crashing tests
1 parent 118893d commit 7e870d0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/python-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, 3.13, "pypy3.10"]
14+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, 3.13, "pypy-3.10-v7.3.17"]
1515

1616
steps:
1717
- uses: actions/checkout@v2

config_framework/types/variable.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
)
88

99
from . import custom_exceptions
10+
from .abstract.loader import AbstractLoader
1011
from .variable_key import VariableKey
1112

1213
if TYPE_CHECKING:
13-
from .config import BaseConfig
14-
from .abstract.loader import AbstractLoader
14+
from .config import BaseConfig # noqa: Used for mypy
15+
1516

1617
Var = TypeVar("Var")
17-
Source = TypeVar("Source", bound=Union[AbstractLoader, BaseConfig])
18+
Source = TypeVar("Source", bound=Union[AbstractLoader, "BaseConfig"])
1819
CustomSerializer = Callable[["Variable", Var], Any]
1920
CustomDeserializer = Callable[["Variable", Any], Var]
2021
CustomValidator = Callable[["Variable", Var], bool]

0 commit comments

Comments
 (0)