File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import sys
34from dataclasses import asdict
45from dataclasses import dataclass
56from dataclasses import field
67from dataclasses import fields
78from importlib .metadata import PackageNotFoundError
89from importlib .metadata import version
910from pathlib import Path
10- from typing import Self
11+ from typing import TYPE_CHECKING
1112
1213import yaml
1314from platformdirs import user_config_dir
1415
1516from ozi_core import __version__
1617
18+ if TYPE_CHECKING :
19+ if sys .version_info > (3 , 11 ):
20+ from typing import Self
21+ else :
22+ from typing_extensions import Self
23+
1724try :
1825 core_version = version ('ozi-core' )
1926except PackageNotFoundError :
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import sys
34from dataclasses import dataclass
45from pathlib import Path
5- from typing import Self
6+
7+ if sys .version_info > (3 , 11 ):
8+ from typing import Self
9+ else :
10+ from typing_extensions import Self
611
712from ozi_core import __version__ as __version__
813
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ dependencies = [
3535 ' dnspython~=2.7.0' ,
3636 ' idna~=3.10' ,
3737 ' meson[ninja]~=1.1' ,
38- ' ozi-templates==2.24.3 ' ,
39- ' ozi-spec==0.27.1 ' ,
38+ ' ozi-templates==2.24.4 ' ,
39+ ' ozi-spec==0.27.2 ' ,
4040 ' packaging>=24.1,<26.0' ,
4141 ' platformdirs~=4.3' ,
4242 ' prompt-toolkit~=3.0.48' ,
@@ -45,6 +45,7 @@ dependencies = [
4545 ' niquests~=3.14.0' ,
4646 ' spdx-license-list==3.26.0' ,
4747 ' trove-classifiers==2025.4.11.15' ,
48+ ' typing-extensions;python_version<="3.11"' ,
4849 ' types-PyYAML~=6.0' ,
4950 ' pathvalidate~=3.2.1' ,
5051 ' webui2==2.5.5' ,
Original file line number Diff line number Diff line change 22from __future__ import annotations
33
44import argparse
5+ import sys
56import typing
7+ import warnings
68from datetime import timedelta
79
810import pytest
911from hypothesis import given
1012from hypothesis import settings
1113from hypothesis import strategies as st
1214
13- import ozi_core .actions
15+ if sys .version_info < (3 , 11 ):
16+ warnings .filterwarnings ('ignore' , category = FutureWarning )
17+ import ozi_core .actions
18+
19+ warnings .filterwarnings ('default' )
20+ else :
21+ import ozi_core .actions
1422
1523
1624@settings (deadline = timedelta (milliseconds = 500 ))
You can’t perform that action at this time.
0 commit comments