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

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

                Author: ASF GitHub Bot
            Created on: 25/Oct/19 01:10
            Start Date: 25/Oct/19 01:10
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on issue #9056: [BEAM-7746] Add 
python type hints
URL: https://github.com/apache/beam/pull/9056#issuecomment-546159903
 
 
   Thanks for the feedback.
   
   > I'm fine with an assert there, though it seems noisy compared to the error 
that we'd just be getting at the next point.
   
   Asserts are a pretty common pattern with typing.  It's a way to acknowledge 
"this _could_ fail here given the type constraints".  Otherwise, mypy doesn't 
know what errors we're willing to tolerate.  The alternative is to add a `# 
type: ignore` comment but the assert provides a way to be more precise (both 
for those reading the code and receiving a potential error at runtime) and also 
affect all of the code below it at that scope (otherwise it could require many 
`# type: ignore` comments).  
   
   > Can you file a JIRA to follow up on this?
   
   Will do.
   
 
----------------------------------------------------------------
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: 333810)
    Time Spent: 9h 50m  (was: 9h 40m)

> Add type hints to python code
> -----------------------------
>
>                 Key: BEAM-7746
>                 URL: https://issues.apache.org/jira/browse/BEAM-7746
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 9h 50m
>  Remaining Estimate: 0h
>
> As a developer of the beam source code, I would like the code to use pep484 
> type hints so that I can clearly see what types are required, get completion 
> in my IDE, and enforce code correctness via a static analyzer like mypy.
> This may be considered a precursor to BEAM-7060
> Work has been started here:  [https://github.com/apache/beam/pull/9056]
>  
>  



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

Reply via email to