[
https://issues.apache.org/jira/browse/BEAM-7746?focusedWorklogId=371854&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-371854
]
ASF GitHub Bot logged work on BEAM-7746:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jan/20 20:16
Start Date: 14/Jan/20 20:16
Worklog Time Spent: 10m
Work Description: chadrik commented on pull request #10367: [BEAM-7746]
Add python type hints (part 2)
URL: https://github.com/apache/beam/pull/10367#discussion_r366551380
##########
File path: sdks/python/gen_protos.py
##########
@@ -47,6 +50,164 @@
]
+def generate_urn_files(log, out_dir):
Review comment:
I did a quick test and the result appears as expected.
Tested on master:
```
>>> import apache_beam.portability.common_urns as common
>>> import apache_beam.portability.api.beam_job_api_pb2 as beam_job_api_pb
>>> jobapi = common.PropertiesFromEnumType(beam_job_api_pb.JobState.Enum)
>>> vars(jobapi.RUNNING)
{'constant': u'', 'label_props': , 'spec': , 'urn': u''}
```
Tested on this branch:
```
>>> import apache_beam.portability.api.beam_job_api_pb2_urns as job_urns
>>> job_urns.JobState.Enum.RUNNING
PropertiesFromEnumValue(urn=u'', constant=u'', spec=, label_props=)
```
----------------------------------------------------------------
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: 371854)
Time Spent: 51h 40m (was: 51.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: 51h 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
(v8.3.4#803005)