saavan-google-intern commented on a change in pull request #12009:
URL: https://github.com/apache/beam/pull/12009#discussion_r441851515



##########
File path: sdks/python/apache_beam/pvalue.py
##########
@@ -158,6 +159,20 @@ def __ne__(self, other):
   def __hash__(self):
     return hash((self.tag, self.producer))
 
+  class PCollectionTypeConstraint(SequenceTypeConstraint):

Review comment:
       Moved it back to the typehints module
   
   Both files import from each other causing a circular import error so the 
current (hacky) workaround is to put the import inside of 
PCollectionTypeConstraint's __class_getitem__ function, which works. There are 
[no performance drawbacks](https://stackoverflow.com/questions/3095071/) to 
this approach but it's not consistent with the existing styling so I will look 
for a better solution.




----------------------------------------------------------------
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]


Reply via email to