Skip to content

Commit

Permalink
python 3.9 typing
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed Jan 24, 2025
1 parent b00451c commit 8bcddc5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/specklepy/objects/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass, field
from typing import Generic, List, TypeVar
from typing import Dict, Generic, List, TypeVar

from specklepy.logging.exceptions import SpeckleInvalidUnitException
from specklepy.objects.base import Base
Expand All @@ -13,8 +13,7 @@
# generic interfaces
@dataclass(kw_only=True)
class ICurve(metaclass=ABCMeta):
_domain: Interval = field(
default_factory=Interval.unit_interval, init=False)
_domain: Interval = field(default_factory=Interval.unit_interval, init=False)

@property
@abstractmethod
Expand All @@ -39,7 +38,6 @@ def displayValue(self) -> T:
pass


# field interfaces
# field interfaces
@dataclass(kw_only=True)
class IHasUnits(metaclass=ABCMeta):
Expand Down Expand Up @@ -99,7 +97,7 @@ def volume(self, value: float):
class IProperties(metaclass=ABCMeta):
@property
@abstractmethod
def properties(self) -> dict[str, object]:
def properties(self) -> Dict[str, object]:
pass


Expand Down

0 comments on commit 8bcddc5

Please sign in to comment.