diff --git a/analyze.py b/analyze.py index f5ef09eb25a924c53f8d54be0004a57e91b4eeef_YW5hbHl6ZS5weQ==..98aeee052101c0eaf8ed7799e4f31e0640c82881_YW5hbHl6ZS5weQ== 100644 --- a/analyze.py +++ b/analyze.py @@ -405,7 +405,6 @@ return True if isinstance(rhs, nodes.Comparison): rhs = rhs.children[0] - rschema = self.schema.rschema(rtype) if isinstance(lhs, nodes.Constant): # lhs is a constant node (simplified tree) if not isinstance(rhs, nodes.VariableRef): diff --git a/nodes.py b/nodes.py index f5ef09eb25a924c53f8d54be0004a57e91b4eeef_bm9kZXMucHk=..98aeee052101c0eaf8ed7799e4f31e0640c82881_bm9kZXMucHk= 100644 --- a/nodes.py +++ b/nodes.py @@ -85,7 +85,10 @@ return None def get_description(self, mainindex, tr): - return tr(self.get_type()) + mytype = self.get_type() + if mytype != 'Any': + return tr(mytype) + return 'Any' # rql st edition utilities #################################################### @@ -568,9 +571,9 @@ return tr(self.get_type()) except CoercionError: for vref in self.iget_nodes(VariableRef): - type = vref.get_description(mainindex, tr) - if type is not None : - return type + vtype = vref.get_description(mainindex, tr) + if vtype != 'Any': + return tr(vtype) class Function(HSMixin, Node): @@ -963,7 +966,7 @@ if vtype is not None: vtypes.add(vtype) if vtypes: - return ', '.join(sorted(tr(vtype) for vtype in vtypes)) + return ', '.join(sorted(vtype for vtype in vtypes)) return vtype # Variable compatibility diff --git a/stmts.py b/stmts.py index f5ef09eb25a924c53f8d54be0004a57e91b4eeef_c3RtdHMucHk=..98aeee052101c0eaf8ed7799e4f31e0640c82881_c3RtdHMucHk= 100644 --- a/stmts.py +++ b/stmts.py @@ -387,4 +387,5 @@ """ descr = [] for term in self.selection: + # don't translate Any try: @@ -390,3 +391,3 @@ try: - descr.append(term.get_description(mainindex, tr) or tr('Any')) + descr.append(term.get_description(mainindex, tr) or 'Any') except CoercionError: @@ -392,5 +393,5 @@ except CoercionError: - descr.append(tr('Any')) + descr.append('Any') return descr @property