[
https://issues.apache.org/jira/browse/BEAM-8280?focusedWorklogId=418780&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-418780
]
ASF GitHub Bot logged work on BEAM-8280:
----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Apr/20 18:22
Start Date: 08/Apr/20 18:22
Worklog Time Spent: 10m
Work Description: udim commented on pull request #11232: [BEAM-8280]
Document Python 3 annotations support
URL: https://github.com/apache/beam/pull/11232#discussion_r405723061
##########
File path: website/src/documentation/sdks/python-type-safety.md
##########
@@ -64,22 +84,75 @@ To specify type hints as properties of a `DoFn` or
`PTransform`, use the decorat
The following code declares an `int` type hint on `FilterEvensDoFn`, using the
decorator `@with_input_types()`.
+```py
+{% github_sample
/apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py
tag:type_hints_do_fn %}
```
-{% github_sample
/apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py
tag:type_hints_do_fn %}```
Decorators receive an arbitrary number of positional and/or keyword arguments,
typically interpreted in the context of the function they're wrapping.
Generally the first argument is a type hint for the main input, and additional
arguments are type hints for side inputs.
-### Defining Generic Types
+### Declaring Type Hints Using Annotations
Review comment:
done
----------------------------------------------------------------
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: 418780)
Time Spent: 12h 20m (was: 12h 10m)
> re-enable IOTypeHints.from_callable
> -----------------------------------
>
> Key: BEAM-8280
> URL: https://issues.apache.org/jira/browse/BEAM-8280
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Udi Meiri
> Assignee: Udi Meiri
> Priority: Major
> Time Spent: 12h 20m
> Remaining Estimate: 0h
>
> See https://issues.apache.org/jira/browse/BEAM-8279
--
This message was sent by Atlassian Jira
(v8.3.4#803005)