udim commented on a change in pull request #11939:
URL: https://github.com/apache/beam/pull/11939#discussion_r440536984
##########
File path: sdks/python/apache_beam/typehints/typehints.py
##########
@@ -435,10 +435,14 @@ def type_check(self, instance):
class TypeVariable(AnyTypeConstraint):
- def __init__(self, name):
+ def __init__(self, name, ignore_name=False):
self.name = name
+ self.ignore_name = ignore_name
def __eq__(self, other):
+ if self.ignore_name:
Review comment:
I think the logic here is reversed? (I don't see ignore_name used in any
test in this commit.)
About naming: (optional ideas)
1. I'd recommend to be more descriptive about when name is ignored. Ex:
`ignore_name_in_eq`
2. I find using positive variable names easier to reason about. `if
use_name_in_eq` is easier to read than `if not ignore_name_in_eq`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]