Skip to content

Commit

Permalink
setter
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby committed Aug 31, 2024
1 parent 0ca7604 commit ff1aaa5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions onnxscript/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def opset(self) -> Opset: ...
@property
def op_schema(self) -> Optional[onnx.defs.OpSchema]: ...

@property
def signature(self) -> Optional[_schemas.OpSignature]: ...


Expand Down Expand Up @@ -335,6 +336,10 @@ def signature(self) -> Optional[_schemas.OpSignature]:
self._signature = _schemas.OpSignature.from_op_schema(self.op_schema)
return self._signature

Check warning on line 337 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L336-L337

Added lines #L336 - L337 were not covered by tests

@signature.setter
def signature(self, value: _schemas.OpSignature):
self._signature = value

Check warning on line 341 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L341

Added line #L341 was not covered by tests

@deprecation.deprecated(
since="0.1",
removed_in="the future",
Expand Down Expand Up @@ -528,6 +533,7 @@ def op_schema(self) -> Optional[onnx.defs.OpSchema]:

return self._op_schema

@property
def signature(self) -> Optional[_schemas.OpSignature]:
"""Returns the signature of this op."""
if self._signature is not None:
Expand All @@ -541,6 +547,10 @@ def signature(self) -> Optional[_schemas.OpSignature]:
)
return self._signature

Check warning on line 548 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L548

Added line #L548 was not covered by tests

@signature.setter
def signature(self, value: _schemas.OpSignature):
self._signature = value

Check warning on line 552 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L552

Added line #L552 was not covered by tests

def __getitem__(self, instance):
"""Returns a lambda to evaluate function using given evaluator instance.
Expand Down Expand Up @@ -672,6 +682,10 @@ def signature(self) -> Optional[_schemas.OpSignature]:
)
return self._signature

Check warning on line 683 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L683

Added line #L683 was not covered by tests

@signature.setter
def signature(self, value: _schemas.OpSignature):
self._signature = value

Check warning on line 687 in onnxscript/values.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/values.py#L687

Added line #L687 was not covered by tests

@deprecation.deprecated(
since="0.1",
removed_in="the future",
Expand Down

0 comments on commit ff1aaa5

Please sign in to comment.