[
https://issues.apache.org/jira/browse/BEAM-7746?focusedWorklogId=279890&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-279890
]
ASF GitHub Bot logged work on BEAM-7746:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Jul/19 18:44
Start Date: 19/Jul/19 18:44
Worklog Time Spent: 10m
Work Description: chadrik commented on pull request #9056: [BEAM-7746]
Add python type hints
URL: https://github.com/apache/beam/pull/9056#discussion_r305480761
##########
File path: sdks/python/apache_beam/io/gcp/datastore/v1/query_splitter.py
##########
@@ -37,7 +37,7 @@
PropertyFilter.GREATER_THAN,
PropertyFilter.GREATER_THAN_OR_EQUAL]
except ImportError:
- UNSUPPORTED_OPERATORS = None
+ UNSUPPORTED_OPERATORS = None # type: ignore
Review comment:
Yes, you can exclude errors from specific modules and packages. That said,
it's still a lot of work to get even a restricted set of modules passing, and
if you restrict the set of checked modules too much then you undermine the
value of type checking. I've written a [mypy
runner](https://github.com/chadrik/mypy-runner) that let's you focus on a
specific set of errors, so that you can tackle problems one error _type_ at a
time, rather than one file at a time. We're using this where I work and it's
been quite successful.
----------------------------------------------------------------
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: 279890)
Time Spent: 4h 40m (was: 4.5h)
> 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: 4h 40m
> 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
(v7.6.14#76016)