Lunderberg commented on code in PR #10906:
URL: https://github.com/apache/tvm/pull/10906#discussion_r843134575
##########
tests/scripts/ci.py:
##########
@@ -434,6 +436,26 @@ def cli_name(s: str) -> str:
return s.replace("_", "-")
+def typing_get_origin(annotation):
+ if sys.version_info >= (3, 8):
+ return typing.get_origin(annotation)
+ else:
+ return annotation.__origin__
+
+
+def typing_get_args(annotation):
+ if sys.version_info >= (3, 8):
+ return typing.get_args(annotation)
+ else:
+ return annotation.__args__
+
+
+def is_optional_type(annotation):
Review Comment:
Thank you, and added in!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]