You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/07 18:47:00 UTC

[jira] [Work logged] (BEAM-8280) re-enable IOTypeHints.from_callable

     [ https://issues.apache.org/jira/browse/BEAM-8280?focusedWorklogId=431853&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-431853 ]

ASF GitHub Bot logged work on BEAM-8280:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/May/20 18:46
            Start Date: 07/May/20 18:46
    Worklog Time Spent: 10m 
      Work Description: udim commented on a change in pull request #11070:
URL: https://github.com/apache/beam/pull/11070#discussion_r421718341



##########
File path: website/src/_posts/2020-03-06-python-typing.md
##########
@@ -0,0 +1,117 @@
+---
+layout: post
+title:  "Python SDK Typing Changes"
+date:   2020-03-06 00:00:01 -0800
+excerpt_separator: <!--more-->
+categories: blog python typing
+authors:
+  - chadrik
+  - udim
+
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+TODO excerpt
+
+<!--more-->
+
+Python supports type annotations on functions (PEP 484). Static type checkers,
+such as mypy, are used to verify adherence to these types.
+For example:
+```py
+def f(v: int) -> int:
+  return v[0]
+```
+Running mypy on the above code will give the error:
+`Value of type "int" is not indexable`.
+
+We've recently made changes to Beam in 2 areas:
+
+Adding type hints throughout Beam. TODO expand
+
+Second, we've added support for Python 3 type annotations. This allows SDK
+users to specify a DoFn's type hints in one place. 
+We've also expanded Beam's support of `typing` module types.
+
+For more background see: 
+[Ensuring Python Type Safety](https://beam.apache.org/documentation/sdks/python-type-safety/).
+
+# Beam Is Typed
+
+TODO

Review comment:
       Yes, that works




----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 431853)
    Time Spent: 12h 40m  (was: 12.5h)

> 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
>             Fix For: 2.21.0
>
>          Time Spent: 12h 40m
>  Remaining Estimate: 0h
>
> See https://issues.apache.org/jira/browse/BEAM-8279



--
This message was sent by Atlassian Jira
(v8.3.4#803005)