[mypy]: Add type hints for EtypeResolver class:
- Nov 25, 2021
-
-
Nsukami Patrick authored
- `visit_insert` method should only accept rql.stmts.Insert type nodes - `visit_delete` should only accept rql.stmts.Delete type nodes
363e373faea0 -
Nsukami Patrick authored3a6b677aeceb
-
Nsukami Patrick authoredd3e682fb1581
-
Nsukami Patrick authored8db2dd12a755
-
Nsukami Patrick authoredc74728e000f7
-
Nsukami Patrick authored
- improve type aliases, Select is not a statement - pick better names for type aliases
5f2d7c42967c -
Nsukami Patrick authored
The `_visit` method receive a node as first parameter. Annotate `node`: - either as a union of all 18 possible node types - or just type node as BaseNode (picked solution)
f760e6bf9ae2
-
- Nov 24, 2021
-
-
Nsukami Patrick authored690d813017e7
-
Nsukami Patrick authored3ac7ee1a7fe2
-
- Nov 23, 2021
-
-
Nsukami Patrick authored
There was an unused protocol definition sleeping within the rql/interfaces.py module. This protocol (ISchema) perfectly represent what a schema should be. Let's use it to annotate the schema attribute within the RQLHelper class
-
Nsukami Patrick authored
Within rql/analyze.py: ---------------------- add (line 403): if self.uid_func: and fix: error: "None" not callable [misc] add (line 548): assert self.uid_func_mapping is not None and fix: Unsupported right operand type for in ("Optional[Dict[Any, Any]]") change (line 615): etypes = frozenset(t for t in self._nonfinal_domain if t not in etypes) to: etypes = set(t for t in self._nonfinal_domain if t not in etypes) and fix: Incompatible types in assignment (expression has type "FrozenSet[str]", variable has type "Set[Any]") Within rql/interfaces.py: ------------------------- Update ISchema protocol definition: add: def __contains__(): and fix: error: Unsupported right operand type for in ("ISchema") [operator] add: def rschema(self, rtype: Any): and fix: "ISchema" has no attribute "rschema" [attr-defined] add: def eschema(self, etype: Any): and fix: "ISchema" has no attribute "eschema" [attr-defined] See RQL's issue: #15
af2d5233a53f
-