Skip to content

Commit

Permalink
fixing the python version compatibility issue with typing
Browse files Browse the repository at this point in the history
  • Loading branch information
vitthalmagadum committed Mar 7, 2025
1 parent bf74c49 commit d76954b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion anta/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import annotations

import re
from typing import TYPE_CHECKING, Any, ClassVar, Self
from typing import TYPE_CHECKING, Any, ClassVar

from pydantic import model_validator

Expand All @@ -18,10 +18,16 @@
from anta.tools import get_value

if TYPE_CHECKING:
import sys
from ipaddress import IPv4Address

from anta.models import AntaTemplate

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self

CPU_IDLE_THRESHOLD = 25
MEMORY_THRESHOLD = 0.25
DISK_SPACE_THRESHOLD = 75
Expand Down

0 comments on commit d76954b

Please sign in to comment.