udim commented on a change in pull request #11038: [BEAM-7746] More typing fixes
URL: https://github.com/apache/beam/pull/11038#discussion_r393383746
 
 

 ##########
 File path: sdks/python/apache_beam/io/iobase.py
 ##########
 @@ -79,6 +82,23 @@
 
 _LOGGER = logging.getLogger(__name__)
 
+
+class Position(Protocol):
+  def __lt__(self, other):
+    pass
+
+  def __le__(self, other):
+    pass
+
+  def __gt__(self, other):
+    pass
+
+  def __ge__(self, other):
+    pass
+
+
+PositionT = TypeVar('PositionT', bound='Position')
 
 Review comment:
   I don't understand the usage of PositionT. Isn't Position already a type?
   It seems that you could replace all uses of PositionT with Position and it'd 
work the same.

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


With regards,
Apache Git Services

Reply via email to