You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/07/25 15:07:17 UTC
[tinkerpop] 01/03: Minor formatting changes to traversal.py CTR
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 4af872507d6c56cce9cd250d52dd4205df5635f5
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Jul 25 10:38:07 2019 -0400
Minor formatting changes to traversal.py CTR
---
gremlin-python/glv/TraversalSource.template | 10 ++++++----
.../src/main/jython/gremlin_python/process/traversal.py | 10 ++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/gremlin-python/glv/TraversalSource.template b/gremlin-python/glv/TraversalSource.template
index db17c04..2c01269 100644
--- a/gremlin-python/glv/TraversalSource.template
+++ b/gremlin-python/glv/TraversalSource.template
@@ -21,6 +21,7 @@ from aenum import Enum
from .. import statics
from ..statics import long
+
class Traversal(object):
def __init__(self, graph, traversal_strategies, bytecode):
self.graph = graph
@@ -167,11 +168,9 @@ def <%= method %>(*args):
return P.<%= method %>(*args)
<% } %>
-
<% pmethods.findAll{!it.equals("clone")}.each { method -> %>statics.add_static('<%= method %>',<%= method %>)
<% } %>
-
'''
TRAVERSER
'''
@@ -190,6 +189,7 @@ class Traverser(object):
def __eq__(self, other):
return isinstance(other, self.__class__) and self.object == other.object
+
'''
TRAVERSAL SIDE-EFFECTS
'''
@@ -208,6 +208,7 @@ class TraversalSideEffects(object):
def __repr__(self):
return "sideEffects[size:" + str(len(self.keys())) + "]"
+
'''
TRAVERSAL STRATEGIES
'''
@@ -255,6 +256,7 @@ class TraversalStrategy(object):
def __repr__(self):
return self.strategy_name
+
'''
BYTECODE
'''
@@ -326,7 +328,7 @@ class Bindings(object):
def of(self,key,value):
if not isinstance(key, str):
raise TypeError("Key must be str")
- return (key,value)
+ return (key, value)
class Binding(object):
@@ -341,4 +343,4 @@ class Binding(object):
return hash(self.key) + hash(self.value)
def __repr__(self):
- return "binding[" + self.key + "=" + str(self.value) + "]"
\ No newline at end of file
+ return "binding[" + self.key + "=" + str(self.value) + "]"
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
index 1782b98..128808d 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
@@ -21,6 +21,7 @@ from aenum import Enum
from .. import statics
from ..statics import long
+
class Traversal(object):
def __init__(self, graph, traversal_strategies, bytecode):
self.graph = graph
@@ -329,7 +330,6 @@ def without(*args):
return P.without(*args)
-
statics.add_static('between',between)
statics.add_static('eq',eq)
@@ -357,7 +357,6 @@ statics.add_static('within',within)
statics.add_static('without',without)
-
'''
TRAVERSER
'''
@@ -376,6 +375,7 @@ class Traverser(object):
def __eq__(self, other):
return isinstance(other, self.__class__) and self.object == other.object
+
'''
TRAVERSAL SIDE-EFFECTS
'''
@@ -394,6 +394,7 @@ class TraversalSideEffects(object):
def __repr__(self):
return "sideEffects[size:" + str(len(self.keys())) + "]"
+
'''
TRAVERSAL STRATEGIES
'''
@@ -440,6 +441,7 @@ class TraversalStrategy(object):
def __repr__(self):
return self.strategy_name
+
'''
BYTECODE
'''
@@ -511,7 +513,7 @@ class Bindings(object):
def of(self,key,value):
if not isinstance(key, str):
raise TypeError("Key must be str")
- return (key,value)
+ return (key, value)
class Binding(object):
@@ -526,4 +528,4 @@ class Binding(object):
return hash(self.key) + hash(self.value)
def __repr__(self):
- return "binding[" + self.key + "=" + str(self.value) + "]"
\ No newline at end of file
+ return "binding[" + self.key + "=" + str(self.value) + "]"