Skip to content

Commit

Permalink
Simplify SQLTranslator._init__()
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Jan 23, 2022
1 parent c2b3a57 commit 0977b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pony/orm/sqltranslation.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def deepcopy(translator):
return result

def __init__(translator, tree, parent_translator, code_key=None, filter_num=None, extractors=None, vars=None, vartypes=None, left_join=False, optimize=None):
ASTTranslator.__init__(translator, tree)
translator.id = next(translator_counter)
local.translators.append(translator)
try:
Expand All @@ -248,7 +249,6 @@ def __init__(translator, tree, parent_translator, code_key=None, filter_num=None
def init(translator, tree, parent_translator, code_key=None, filter_num=None, extractors=None, vars=None, vartypes=None, left_join=False, optimize=None):
this = translator
assert isinstance(tree, ast.GeneratorExp), tree
ASTTranslator.__init__(translator, tree)
translator.can_be_cached = True
translator.parent = parent_translator
translator.injected = False
Expand Down

0 comments on commit 0977b95

Please sign in to comment.