You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ie...@apache.org on 2021/02/02 16:51:40 UTC
[avro] branch master updated: AVRO-3032: Use best practice for
namedtuple
This is an automated email from the ASF dual-hosted git repository.
iemejia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 02bdc2d AVRO-3032: Use best practice for namedtuple
02bdc2d is described below
commit 02bdc2da3ade2fe5a0c1138bff0d4574a8d7075b
Author: Ryan Skraba <ry...@skraba.com>
AuthorDate: Tue Feb 2 13:12:54 2021 +0100
AVRO-3032: Use best practice for namedtuple
---
lang/py/avro/tether/tether_task.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lang/py/avro/tether/tether_task.py b/lang/py/avro/tether/tether_task.py
index dafb42c..0a7bb70 100644
--- a/lang/py/avro/tether/tether_task.py
+++ b/lang/py/avro/tether/tether_task.py
@@ -51,7 +51,7 @@ inputProtocol = avro.protocol.parse(prototxt)
taskschema = inputProtocol.types_dict["TaskType"]
# Mypy cannot statically type check a dynamically constructed named tuple.
# Since InputProtocol.avpr is hard-coded here, we can hard-code the symbols.
-_ttype = collections.namedtuple("_tasktype", ("MAP", "REDUCE"))
+_ttype = collections.namedtuple("_ttype", ("MAP", "REDUCE"))
TaskType = _ttype(*taskschema.symbols)
pfile = os.path.split(__file__)[0] + os.sep + "OutputProtocol.avpr"