Skip to content

Commit e87dbf8

Browse files
committed
pipeline fixes
1 parent dae1bbf commit e87dbf8

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

tests/test_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from types import MappingProxyType
99
from typing import Any
1010
from typing import Callable
11-
from typing import Type
1211

1312
import pytest
1413

@@ -128,7 +127,7 @@ def test_parsed_document_are_properly_json_representable(
128127
],
129128
)
130129
def test_parse_raises_errors_for_invalid_toml_files(
131-
invalid_example: Callable[[str], str], error: Type[Exception], example_name: str
130+
invalid_example: Callable[[str], str], error: type[Exception], example_name: str
132131
) -> None:
133132
with pytest.raises(error):
134133
parse(invalid_example(example_name))

tests/test_items.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import copy
24
import math
35
import pickle

tomlkit/container.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
import math
55

66
from collections.abc import Iterator
7+
from typing import TYPE_CHECKING
78
from typing import Any
8-
from typing import Self
9+
10+
11+
if TYPE_CHECKING:
12+
from typing import Self
913

1014
from tomlkit._compat import decode
1115
from tomlkit._types import _CustomDict

tomlkit/items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
if TYPE_CHECKING:
3838
from typing import Protocol
3939

40-
from tomlkit.container import OutOfOrderTableProxy
4140
from tomlkit import container
41+
from tomlkit.container import OutOfOrderTableProxy
4242

4343
class Encoder(Protocol):
4444
def __call__(self, __value: Any, /) -> Item: ...

0 commit comments

Comments
 (0)