Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
The `span` field was only ever used to construct a TIR constant with a
known span, wasn't used at any of its callsites.
  • Loading branch information
Lunderberg committed Feb 14, 2024
1 parent d8b9ab9 commit 9c19c12
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions python/tvm/runtime/object_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def asobject(self):
ObjectTypes = (ObjectBase, NDArrayBase, Module, ObjectRValueRef, PackedFuncBase, PyNativeObject)


def convert_to_object(value, span=None):
def convert_to_object(value):
"""Convert a Python value to corresponding object type.
Type conversions performed by this function must *only* produce
Expand All @@ -54,9 +54,6 @@ def convert_to_object(value, span=None):
value : str
The value to be inspected.
span : Optional[Span]
The location of this itervar in the source code.
Returns
-------
obj : Object
Expand Down Expand Up @@ -90,16 +87,13 @@ def convert_to_object(value, span=None):
raise TypeError(f"don't know how to convert type {type(value)} to object")


def convert(value, span=None):
def convert(value):
"""Convert value to TVM object or function.
Parameters
----------
value : python value
span : Optional[Span]
The location of this statement in the source code.
Returns
-------
tvm_val : Object or Function
Expand All @@ -111,7 +105,7 @@ def convert(value, span=None):
the codebase. We can choose one to keep and discard the other one later.
"""

return convert_to_object(value, span=span)
return convert_to_object(value)


def _scalar_type_inference(value):
Expand Down

0 comments on commit 9c19c12

Please sign in to comment.