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

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

                Author: ASF GitHub Bot
            Created on: 26/Dec/19 21:09
            Start Date: 26/Dec/19 21:09
    Worklog Time Spent: 10m 
      Work Description: udim commented on issue #10466: [BEAM-9012] Change 
__init__ hints so they work with pytype
URL: https://github.com/apache/beam/pull/10466#issuecomment-569133985
 
 
   > Is it necessary to change the style of the annotations? I saw the issue 
you opened which indicated that pytype doesn’t support per-line annotations and 
won’t in the future in light of python2-EOL. So why change it in these two 
places, since the per-line style is still used in dozens of other places in the 
code?
   
   I believe that pytype is being run in a way that errors/warnings on imported 
Beam modules are ignored. If user code, however, tries to call a Beam interface 
that's hinted as non-callable that's an error.
   
   Also, since pytype is not parsing these comments well it sometimes ignores 
them (`Stray type comment: XXX [ignored-type-comment]`) and sometimes reads 
them as a function hint (at the end of the list) (`'XXX' object is not callable 
[not-callable]`).
 
----------------------------------------------------------------
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: 363725)
    Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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