[ 
https://issues.apache.org/jira/browse/BEAM-10258?focusedWorklogId=451322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-451322
 ]

ASF GitHub Bot logged work on BEAM-10258:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Jun/20 22:40
            Start Date: 25/Jun/20 22:40
    Worklog Time Spent: 10m 
      Work Description: saavan-google-intern commented on a change in pull 
request #12009:
URL: https://github.com/apache/beam/pull/12009#discussion_r445877050



##########
File path: sdks/python/apache_beam/typehints/decorators.py
##########
@@ -378,6 +379,61 @@ def has_simple_output_type(self):
         self.output_types and len(self.output_types[0]) == 1 and
         not self.output_types[1])
 
+  def strip_pcoll_input(self):
+    # type: () -> IOTypeHints
+
+    error_str = 'An input typehint to a PTransform must be a single (or 
nested) type wrapped by a PCollection or ' \
+                'PBegin. '
+
+    if any(element is None for element in [self.input_types, 
self.input_types[0], self.input_types[0][0]]):

Review comment:
       Now that I think about it this can be a simple try/catch IndexError 
instead of manually checking for None




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 451322)
    Time Spent: 12h 20m  (was: 12h 10m)

> Support type hint annotations on PTransform's expand()
> ------------------------------------------------------
>
>                 Key: BEAM-10258
>                 URL: https://issues.apache.org/jira/browse/BEAM-10258
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Saavan Nanavati
>            Assignee: Saavan Nanavati
>            Priority: P2
>          Time Spent: 12h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to