You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by gi...@apache.org on 2019/07/24 09:31:12 UTC
[beam] branch asf-site updated: Publishing website 2019/07/24
09:31:00 at commit 4935d0c
This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/asf-site by this push:
new d2d4607 Publishing website 2019/07/24 09:31:00 at commit 4935d0c
d2d4607 is described below
commit d2d4607eade3d63b38a16453e15103d37390adcc
Author: jenkins <bu...@apache.org>
AuthorDate: Wed Jul 24 09:31:00 2019 +0000
Publishing website 2019/07/24 09:31:00 at commit 4935d0c
---
.../documentation/sdks/python-type-safety/index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/website/generated-content/documentation/sdks/python-type-safety/index.html b/website/generated-content/documentation/sdks/python-type-safety/index.html
index 42ad4d9..1e34dd3 100644
--- a/website/generated-content/documentation/sdks/python-type-safety/index.html
+++ b/website/generated-content/documentation/sdks/python-type-safety/index.html
@@ -368,10 +368,10 @@ evens = numbers | beam.ParDo(FilterEvensDoFn())
<p>You can use type hint annotations to define generic types. The following code specifies an input type hint that asserts the generic type <code class="highlighter-rouge">T</code>, and an output type hint that asserts the type <code class="highlighter-rouge">Tuple[int, T]</code>.</p>
-<div class="highlighter-rouge"><pre class="highlight"><code>T = beam.typehints.TypeVariable('T')
+<div class="highlighter-rouge"><pre class="highlight"><code>T = typing.TypeVar('T')
@beam.typehints.with_input_types(T)
-@beam.typehints.with_output_types(beam.typehints.Tuple[int, T])
+@beam.typehints.with_output_types(typing.Tuple[int, T])
class MyTransform(beam.PTransform):
def expand(self, pcoll):
return pcoll | beam.Map(lambda x: (len(x), x))
@@ -484,7 +484,7 @@ totals = (
lines
| beam.Map(parse_player_and_score)
| beam.CombinePerKey(sum).with_input_types(
- beam.typehints.Tuple[Player, int]))
+ typing.Tuple[Player, int]))
</code></pre>
</div>