Skip to content

Commit 985032c

Browse files
authored
Merge pull request #7 from cloudblue/feature/LITE-24359
LITE-24359 Changed class methods to object methods in BaseRQLTransformer
2 parents d13f65b + a5155ca commit 985032c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

py_rql/transformer.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515

1616
class BaseRQLTransformer(Transformer):
17-
@classmethod
18-
def _extract_comparison(cls, args):
17+
def _extract_comparison(self, args):
1918
if len(args) == 2:
2019
# Notation: id=1 # noqa: E800
2120
operation = ComparisonOperators.EQ
@@ -24,20 +23,19 @@ def _extract_comparison(cls, args):
2423

2524
elif args[0].data == 'comp_term':
2625
# Notation: eq(id,1) # noqa: E800
27-
operation = cls._get_value(args[0])
26+
operation = self._get_value(args[0])
2827
prop_index = 1
2928
value_index = 2
3029

3130
else:
3231
# Notation: id=eq=1
33-
operation = cls._get_value(args[1])
32+
operation = self._get_value(args[1])
3433
prop_index = 0
3534
value_index = 2
3635

37-
return cls._get_value(args[prop_index]), operation, cls._get_value(args[value_index])
36+
return self._get_value(args[prop_index]), operation, self._get_value(args[value_index])
3837

39-
@staticmethod
40-
def _get_value(obj):
38+
def _get_value(self, obj):
4139
while isinstance(obj, Tree):
4240
obj = obj.children[0]
4341

0 commit comments

Comments
 (0)