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

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

                Author: ASF GitHub Bot
            Created on: 26/Dec/19 20:50
            Start Date: 26/Dec/19 20:50
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on pull request #10466: [BEAM-9012] 
Change __init__ hints so they work with pytype
URL: https://github.com/apache/beam/pull/10466#discussion_r361530233
 
 

 ##########
 File path: sdks/python/apache_beam/pipeline.py
 ##########
 @@ -120,10 +120,11 @@ def sdk_transforms_with_environment(cls):
     return frozenset().union(*sets)
 
   def __init__(self,
-               runner=None,  # type: Optional[Union[str, PipelineRunner]]
-               options=None,  # type: Optional[PipelineOptions]
-               argv=None  # type: Optional[List[str]]
+               runner=None,
+               options=None,
+               argv=None
               ):
+    # type: (Optional[Union[str, PipelineRunner]], Optional[PipelineOptions], 
type: Optional[List[str]]) -> None
 
 Review comment:
   There’s a stray “type:” here
 
----------------------------------------------------------------
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: 363722)
    Time Spent: 0.5h  (was: 20m)

> Include `-> None` on Pipeline and PipelineOptions `__init__` methods for 
> pytype compatibility
> ---------------------------------------------------------------------------------------------
>
>                 Key: BEAM-9012
>                 URL: https://issues.apache.org/jira/browse/BEAM-9012
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: Major
>             Fix For: 2.19.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> mypy [made a decision|https://github.com/python/mypy/issues/604] to allow 
> init methods to omit {{\-> None}} return type annotations, but pytype has no 
> such feature. I think we should include {{\-> None}} annotations for pytype 
> compatibility.
> cc: [~chadrik]



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

Reply via email to