This is an automated email from the ASF dual-hosted git repository. florianhockmann pushed a commit to branch TINKERPOP-2726 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 6e8ff0360618fb02344e2ec788e5d26bcdafa23d Author: Florian Hockmann <f...@florian-hockmann.de> AuthorDate: Wed Mar 23 12:34:20 2022 +0100 TINKERPOP-2726 Fix boolean translation in Python --- gremlin-python/src/main/python/gremlin_python/process/translator.py | 2 ++ gremlin-python/src/main/python/tests/process/test_translator.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gremlin-python/src/main/python/gremlin_python/process/translator.py b/gremlin-python/src/main/python/gremlin_python/process/translator.py index 7421e86..52caa63 100755 --- a/gremlin-python/src/main/python/gremlin_python/process/translator.py +++ b/gremlin-python/src/main/python/gremlin_python/process/translator.py @@ -148,6 +148,8 @@ class Translator: with_opts = True elif type(p) == str: script += f'\'{p}\'' + elif type(p) == bool: + script += 'true' if p else 'false' else: script += str(p) c += 1 diff --git a/gremlin-python/src/main/python/tests/process/test_translator.py b/gremlin-python/src/main/python/tests/process/test_translator.py index 316ba3b..54b5c1d 100644 --- a/gremlin-python/src/main/python/tests/process/test_translator.py +++ b/gremlin-python/src/main/python/tests/process/test_translator.py @@ -44,7 +44,7 @@ class TestTraversalStrategies(object): "g.V('1','2','3','4')"]) # 2 tests.append([g.V('3').valueMap(True), - "g.V('3').valueMap(True)"]) + "g.V('3').valueMap(true)"]) # 3 tests.append([g.V().constant(5), "g.V().constant(5)"])