Skip to content

Commit

Permalink
Remove unneded functions
Browse files Browse the repository at this point in the history
  • Loading branch information
neNasko1 committed Dec 4, 2024
1 parent fdf81a3 commit cfae394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions src/spox/_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import warnings
from collections.abc import Iterable, Iterator, Sequence
from dataclasses import dataclass
from typing import Any, Optional, Union, cast
from typing import Optional, Union, cast

from ._attributes import Attr
from ._exceptions import InferenceWarning
Expand Down Expand Up @@ -76,14 +76,6 @@ def __setattr__(self, attr: str, value: Union[Var, Sequence[Var]]) -> None:
else:
self.vars[attr] = value

def __getitem__(self, key: str):
"""Allows dictionary-like access to retrieve variables."""
return self.vars[key]

def __setitem__(self, key: str, value: Union) -> None:
"""Allows dictionary-like access to set variables."""
self.vars[key] = value


@dataclass
class BaseVarInfos(BaseFields):
Expand Down Expand Up @@ -147,10 +139,6 @@ def get_fields(self) -> dict[str, Union[None, _VarInfo, Sequence[_VarInfo]]]:
"""Return a mapping of all fields stored in this object by name."""
return self.__dict__.copy()

def _unpack_to_any(self) -> Any:
"""Unpack the stored fields into a tuple of appropriate length, typed as Any."""
return tuple(self.__dict__.values())

@property
def fully_typed(self) -> bool:
"""Check if all stored variables have a concrete type."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Outputs(BaseOutputs):
outputs: Outputs

def constructor(self, attrs: dict[str, Attr], inputs: BaseVars) -> Outputs:
x = inputs["X"]
x = inputs.X
a = op.mul(
linear(
x,
Expand Down

0 comments on commit cfae394

Please sign in to comment.