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 2022/02/01 00:03:02 UTC

[beam] branch asf-site updated: Publishing website 2022/02/01 00:02:18 at commit 8f8577a

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 5fbe9c1  Publishing website 2022/02/01 00:02:18 at commit 8f8577a
5fbe9c1 is described below

commit 5fbe9c199f8426188b6643e9d75696d1dfe7ef8f
Author: jenkins <bu...@apache.org>
AuthorDate: Tue Feb 1 00:02:18 2022 +0000

    Publishing website 2022/02/01 00:02:18 at commit 8f8577a
---
 .../documentation/sdks/python-type-safety/index.html                  | 4 ++--
 1 file changed, 2 insertions(+), 2 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 892c70d..9e4650d 100644
--- a/website/generated-content/documentation/sdks/python-type-safety/index.html
+++ b/website/generated-content/documentation/sdks/python-type-safety/index.html
@@ -53,12 +53,12 @@ Beam will remove the outer iterable of the return type on the <code>DoFn.process
 It is an error to have a non-iterable return type annotation for these functions.
 Other supported iterable types include: <code>Iterator</code>, <code>Generator</code>, <code>Tuple</code>, <code>List</code>.</p><div class="language-py snippet"><div class="notebook-skip code-snippet"><a class=copy type=button data-bs-toggle=tooltip data-bs-placement=bottom title="Copy to clipboard"><img src=/images/copy-icon.svg></a><div class=highlight><pre class=chroma><code class=language-py data-lang=py><span class=kn>from</span> <span class=nn>typing</span> <span class=kn>import</ [...]
 
-<span class=k>class</span> <span class=nc>FilterEvensDoFn</span><span class=p>(</span><span class=n>beam</span><span class=o>.</span><span class=n>DoFn</span><span class=p>):</span>
+<span class=k>class</span> <span class=nc>TypedFilterEvensDoFn</span><span class=p>(</span><span class=n>beam</span><span class=o>.</span><span class=n>DoFn</span><span class=p>):</span>
   <span class=k>def</span> <span class=nf>process</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>element</span><span class=p>:</span> <span class=nb>int</span><span class=p>)</span> <span class=o>-&gt;</span> <span class=n>Iterable</span><span class=p>[</span><span class=nb>int</span><span class=p>]:</span>
     <span class=k>if</span> <span class=n>element</span> <span class=o>%</span> <span class=mi>2</span> <span class=o>==</span> <span class=mi>0</span><span class=p>:</span>
       <span class=k>yield</span> <span class=n>element</span>
 
-<span class=n>evens</span> <span class=o>=</span> <span class=n>numbers</span> <span class=o>|</span> <span class=s1>&#39;filter_evens&#39;</span> <span class=o>&gt;&gt;</span> <span class=n>beam</span><span class=o>.</span><span class=n>ParDo</span><span class=p>(</span><span class=n>FilterEvensDoFn</span><span class=p>())</span></code></pre></div></div></div><p>The following code declares <code>int</code> input and output type hints on <code>double_evens</code>, using annotations on <c [...]
+<span class=n>evens</span> <span class=o>=</span> <span class=n>numbers</span> <span class=o>|</span> <span class=s1>&#39;filter_evens&#39;</span> <span class=o>&gt;&gt;</span> <span class=n>beam</span><span class=o>.</span><span class=n>ParDo</span><span class=p>(</span><span class=n>TypedFilterEvensDoFn</span><span class=p>())</span></code></pre></div></div></div><p>The following code declares <code>int</code> input and output type hints on <code>double_evens</code>, using annotations  [...]
 Since <code>process</code> returns a <code>list</code> or <code>None</code>, the output type is annotated as <code>Optional[List[int]]</code>.
 Beam will also remove the outer <code>Optional</code> and (as above) the outer iterable of the return type, only on the <code>DoFn.process</code> method and functions passed to <code>FlatMap</code>.</p><div class="language-py snippet"><div class="notebook-skip code-snippet"><a class=copy type=button data-bs-toggle=tooltip data-bs-placement=bottom title="Copy to clipboard"><img src=/images/copy-icon.svg></a><div class=highlight><pre class=chroma><code class=language-py data-lang=py><span  [...]