- 25 Nov, 2021 6 commits
-
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
Nsukami Patrick authored
- improve type aliases, Select is not a statement - pick better names for type aliases
-
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)
-
- 24 Nov, 2021 2 commits
-
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
- 23 Nov, 2021 2 commits
-
-
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
-
- 17 Aug, 2021 4 commits
-
-
Laurent Peuch authored
-
Laurent Peuch authored
-
Laurent Peuch authored
-
Laurent Peuch authored
-
- 19 Oct, 2021 2 commits
-
-
Nsukami Patrick authored
To easily build the wheel using `build_wheel.sh` shell script
-
Nsukami Patrick authored
In order to upload a RQL build using the (faster) gecode library.
-
- 18 Oct, 2021 1 commit
-
-
Nsukami Patrick authored
- Retrieve a copy of Yapps repository - Fix the tiny bugs related to the use of the print function - From now on, install Yapps from Logilab's forge fixes #12
-
- 09 Oct, 2021 3 commits
-
-
Nsukami Patrick authored
There is some cases where the `get_description` method will return None. The TranslationFunction assume the first parameter will be a string, not None. Alternative solutions: - update the condition: vtype is not None and != "Any" (picked solution) - assert returned value is not None whenever necessary - update TranslationFunction signature to take first parameter as Optional[str]. - update all the `get_description` methods to always return a str.
-
Nsukami Patrick authored
- define necessary attributes within a protocol - this protocol should have: - operator attribute - iget_nodes method - get_type method - use the newly defined protocol to type `self` within OperatorExpressionMixin class - remove useless type-ignore comments
-
Nsukami Patrick authored
Inside rqltypes module - define a protocol to describe an object that: - has an attribute named `parent` - parent attribute should have an attribute named `relation` - a method named `get_type` Inside HSMixin: - remove now useless type:ignore comments - type `self` as a `HasHand` type Inside nodes.Constant `get_type` method could return a str or None: - make sure `get_type` always returns a str - change the default value of `_uidtype` from None to empty string - type `_uidtype` as a str
-
- 11 Oct, 2021 2 commits
-
-
Nsukami Patrick authored
- Update Gecode version to the last one - To build rql wheels, starts with Python 3.7 version - Use pip flag --use-feature=in-tree-build, and deal with the following warning: DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
-
Nsukami Patrick authored
-
- 05 Oct, 2021 1 commit
-
-
Nsukami Patrick authored
-
- 03 Oct, 2021 1 commit
-
-
Nsukami Patrick authored
-
- 03 Aug, 2021 1 commit
-
-
Nsukami Patrick authored
-
- 13 Jul, 2021 1 commit
-
-
Nsukami Patrick authored
Inside stmts module, somewhere we read, `self.groupby` attribute being added if not exists and used as a list: ``` if not self.groupby: self.groupby = [] ``` Let's just define: - self.groupby self.orderby as instance attribute - self.groupby self.orderby as List of Any - remove the if not self.grouby check Do the same with the `self.orderby` attribute. Inside Select class: - update `remove` method signature. And fix the error: rql/stmts.py:940: error: Argument 1 to "remove_sort_term" of "Select" has incompatible type "BaseNode"; expected "SortTerm" [arg-type] - update undefine_variable method: remove useless check of var.variable attribute Inside undo.NodeOperation class: - simplify type hint for `node` parameter inside `NodeOperation.__init__` method
-
- 04 Aug, 2021 1 commit
-
-
Nsukami Patrick authored
- Type hint all `parse` functions inside rql/__init__.py - Create a type alias to represent what's returned by `parse` functions above - Update RQLSTChecker.check method signature: * node parameter should be a BaseNode or any children of BaseNode class - Type hint `copy_uid_node` function - Remove useless variable: pyparse = parse - Format without any compromise
-
- 23 Jul, 2021 5 commits
-
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
Nsukami Patrick authored
Update rql.base.Node class: - define self.parent as a TypeVar - define self.children as a List of TypeVar - Those 2 TypeVar are bound, i.e: they can be BaseNode or any children of BaseNode Update rql.stmts.Union class: - add a new attribute, i.e: `children: List["rql.stmts.Select"]` Update rql.RQLHelper simplify & _simplify methods: - remove call to cast method, no more need to cast from BaseNode to Select Also: - Try to harmonize type signature for get_description methods - Remove now obsolete comments related to type hints - type vconsts as a List of Constant
-
Nsukami Patrick authored
- RQLHelper __init__ method takes a parameter `resolver_class` - `revolver_class` is anything implementing the interface of ETypeResolver class - create a protocol named `ResolvesEType` that respect that interface
-
- 22 Jul, 2021 1 commit
-
-
Nsukami Patrick authored
-
- 21 Jul, 2021 1 commit
-
-
Nsukami Patrick authored
See: cubicweb#29
-
- 20 Jul, 2021 2 commits
-
-
Nsukami Patrick authored
-
Nsukami Patrick authored
-
- 11 Jul, 2021 2 commits
-
-
Nsukami Patrick authored
Mypy now only ships with type stubs for stdlib modules. To use third-party libraries that don’t include stubs, we need to explicitly install stub packages. See: http://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
-
Nsukami Patrick authored
-
- 06 Jul, 2021 1 commit
-
-
Nsukami Patrick authored
Move the old code within `parser_main.py` to `parser/__main__.py` So that rql package can be run with the -m module flag. When calling `$ python3 -m rql.parser "Any 1+1;"`, the main function defined inside __main__.py will be executed and the string "Any 1+1;" will be parsed.
-
- 21 Jun, 2021 1 commit
-
-
Nsukami Patrick authored
Are those 2 modules really used anywhere within the Cubi-verse ?
-