Skip to content

Commit

Permalink
removes type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Nov 9, 2023
1 parent 190f903 commit 1be53a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/agent0/agent0/base/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import asdict, dataclass, is_dataclass, replace
from enum import Enum
from functools import wraps
from typing import Any, Type
from typing import Any, Callable, Type, TypeVar

from fixedpointmath import FixedPoint

Expand All @@ -30,10 +30,10 @@ def dtypes(self):
return NotImplemented


def freezable(frozen: bool = False, no_new_attribs: bool = False) -> Type:
def freezable(frozen: bool = False, no_new_attribs: bool = False):
r"""A wrapper that allows classes to be frozen, such that existing member attributes cannot be changed"""

def decorator(cls: Type) -> Type:
def decorator(cls):
# this decorator should only be placed atop a dataclass
if not is_dataclass(cls):
raise TypeError("The class must be a data class.")
Expand Down
4 changes: 2 additions & 2 deletions lib/elfpy/elfpy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def dtypes(self):
return NotImplemented


def freezable(frozen: bool = False, no_new_attribs: bool = False) -> Type:
def freezable(frozen: bool = False, no_new_attribs: bool = False):
r"""A wrapper that allows classes to be frozen, such that existing member attributes cannot be changed"""

def decorator(cls: Type) -> Type:
def decorator(cls):
# this decorator should only be placed atop a dataclass
if not is_dataclass(cls):
raise TypeError("The class must be a data class.")
Expand Down

0 comments on commit 1be53a3

Please sign in to comment.