You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by he...@apache.org on 2021/03/25 01:21:51 UTC
[beam] branch master updated: Use beam, rather than typing,
list type hint.
This is an automated email from the ASF dual-hosted git repository.
heejong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 92e7f83 Use beam, rather than typing, list type hint.
new 4d99d92 Merge pull request #14331 from robertwb/list-coder
92e7f83 is described below
commit 92e7f830ecdbd36acf249b7fe432a9f9890047cb
Author: Robert Bradshaw <ro...@gmail.com>
AuthorDate: Wed Mar 24 15:48:53 2021 -0700
Use beam, rather than typing, list type hint.
This allows nesting of non-typing types.
---
sdks/python/apache_beam/coders/coders.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/coders/coders.py b/sdks/python/apache_beam/coders/coders.py
index a54936b..f65e1c1 100644
--- a/sdks/python/apache_beam/coders/coders.py
+++ b/sdks/python/apache_beam/coders/coders.py
@@ -1192,7 +1192,7 @@ Coder.register_structured_urn(common_urns.coders.ITERABLE.urn, IterableCoder)
class ListCoder(ListLikeCoder):
"""Coder of Python lists."""
def to_type_hint(self):
- return List[self._elem_coder.to_type_hint()]
+ return typehints.List[self._elem_coder.to_type_hint()]
class GlobalWindowCoder(SingletonCoder):