jrmccluskey commented on code in PR #35899: URL: https://github.com/apache/beam/pull/35899#discussion_r2289178204
########## sdks/python/apache_beam/typehints/typehints.py: ########## @@ -1522,7 +1525,10 @@ def is_consistent_with(sub, base): # Cannot check unsupported parameterized generic which will cause issubclass # to fail with an exception. return False - return issubclass(sub, base) + try: + return is_subhint(sub, base) + except (BeartypeDoorException): + return False Review Comment: I was thinking we would do that _eventually_ once we were getting to where we'd skip things like `normalize()` calls, but considering that we'd need to do the plumbing for that anyway I'm not opposed to it. Seeing exactly how best to plumb that through will take a bit, but the bottom level having a `use_beartype` boolean parameter is a good starting point. As written now it's just off with no way to actually enable it, I will look at the actual pipeline option next (can do that either in this PR or in a follow-up, it's going to be next week either way) -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org