Skip to content

Commit

Permalink
Make tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
neNasko1 committed Nov 6, 2024
1 parent d6b59ca commit 340d4c2
Show file tree
Hide file tree
Showing 14 changed files with 1,575 additions and 1,572 deletions.
4 changes: 0 additions & 4 deletions src/spox/_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ class Vars(BaseVars):
def _propagate_vars(
self,
prop_values={},
flatten_variadic=False,
) -> TypeBaseVars:
def _create_var(key, var_info):
ret = Var(var_info, None)
Expand All @@ -229,9 +228,6 @@ def _create_var(key, var_info):
for key, var_info in self.__dict__.items():
if var_info is None or isinstance(var_info, VarInfo):
ret_dict[key] = _create_var(key, var_info)
elif flatten_variadic:
for i, v in enumerate(var_info):
ret_dict[f"{key}_{i}"] = _create_var(f"{key}_{i}", v)
else:
ret_dict[key] = [
_create_var(f"{key}_{i}", v) for i, v in enumerate(var_info)
Expand Down
6 changes: 2 additions & 4 deletions src/spox/_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,10 @@ def inference(self, infer_types: bool = True, input_prop_values={}):
# Attempt to use the ones from kwargs, if none then what type inference gave
var.type = out_types.get(key)

def get_output_vars(self, flatten_variadic=False, input_prop_values={}):
def get_output_vars(self, input_prop_values={}):
# After typing everything, try to get values for outputs
out_values = self.propagate_values(input_prop_values)
return self.outputs._propagate_vars(
out_values, flatten_variadic=flatten_variadic
)
return self.outputs._propagate_vars(out_values)

def validate_types(self) -> None:
"""Validation of types, ran at the end of Node creation."""
Expand Down
Loading

0 comments on commit 340d4c2

Please sign in to comment.