Skip to content

Commit d488448

Browse files
committed
Only add type ignore on untyped variable in function.py
Black autoformats this to a longer line than pylint allows, only marking the relevant variable causes the formatting to run correctly. I think this is fine based on the assumption that the ignores should be removed in favour of proper typing at some point.
1 parent f353bb5 commit d488448

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

python/tvm/tir/function.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,14 @@ def __init__(
8585
raise TypeError("params can only contain Var or Buffer")
8686

8787
self.__init_handle_by_constructor__(
88-
_ffi_api.PrimFunc, param_list, body, ret_type, buffer_map, attrs, resource_handle, span # type: ignore
88+
_ffi_api.PrimFunc, # type: ignore
89+
param_list,
90+
body,
91+
ret_type,
92+
buffer_map,
93+
attrs,
94+
resource_handle,
95+
span,
8996
)
9097

9198
def with_body(self, new_body, span=None):

tests/scripts/task_mypy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ mypy --check-untyped-defs python/tvm/tir/schedule
2323
echo "Checking MyPy Type defs in the analysis package."
2424
mypy --check-untyped-defs python/tvm/tir/analysis/
2525

26-
echo "Checking MyPy Type defs in the transofrm package."
26+
echo "Checking MyPy Type defs in the transform package."
2727
mypy --check-untyped-defs python/tvm/tir/transform/

0 commit comments

Comments
 (0)