From c7549a35a2b4a6676dee43c2a73d33fbfc493eb6 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Thu, 17 Oct 2024 18:42:33 +0900 Subject: [PATCH] fix C0103(invalid-name) errors from pylint --- python/tvm/relax/expr.py | 2 +- python/tvm/tir/schedule/schedule.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/tvm/relax/expr.py b/python/tvm/relax/expr.py index 522eb11d6df7..190df4286056 100644 --- a/python/tvm/relax/expr.py +++ b/python/tvm/relax/expr.py @@ -39,7 +39,7 @@ # This feature is not supported until python 3.10: # https://docs.python.org/3.10/whatsnew/3.10.html#pep-613-typealias Expr = Union[tvm.ir.RelayExpr] -Type = Union[tvm.ir.Type] +Type = Union[tvm.ir.Type] # pylint: disable=invalid-name GlobalVar = Union[tvm.ir.GlobalVar] diff --git a/python/tvm/tir/schedule/schedule.py b/python/tvm/tir/schedule/schedule.py index 17c256be3538..9e8b4dc34fa7 100644 --- a/python/tvm/tir/schedule/schedule.py +++ b/python/tvm/tir/schedule/schedule.py @@ -61,7 +61,8 @@ def __init__(self) -> None: # It is a workaround for mypy: https://github.com/python/mypy/issues/7866#issuecomment-549454370 # This feature is not supported until python 3.10: # https://docs.python.org/3.10/whatsnew/3.10.html#pep-613-typealias -ExprRV = Union[PrimExpr] # A random variable that evaluates to an integer +# A random variable that evaluates to an integer +ExprRV = Union[PrimExpr] # pylint: disable=invalid-name RAND_VAR_TYPE = Union[ExprRV, BlockRV, LoopRV] # pylint: disable=invalid-name