1. 03 Jan, 2022 1 commit
  2. 22 Dec, 2021 2 commits
  3. 05 Jan, 2022 1 commit
  4. 03 Dec, 2021 1 commit
  5. 14 Dec, 2021 1 commit
  6. 01 Dec, 2021 1 commit
  7. 02 Dec, 2021 1 commit
  8. 01 Dec, 2021 1 commit
  9. 30 Nov, 2021 1 commit
  10. 25 Nov, 2021 2 commits
  11. 24 Nov, 2021 3 commits
  12. 25 Nov, 2021 7 commits
  13. 24 Nov, 2021 2 commits
  14. 23 Nov, 2021 2 commits
    • Nsukami Patrick's avatar
      [mypy] Type RQLHelper's schema attribute as ISchema · bd85b7006744
      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
      bd85b7006744
    • Nsukami Patrick's avatar
      [mypy]: Add type hints for EtypeResolver class: · af2d5233a53f
      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: ...
      af2d5233a53f
  15. 17 Aug, 2021 4 commits
  16. 19 Oct, 2021 2 commits
  17. 18 Oct, 2021 1 commit
  18. 09 Oct, 2021 3 commits
    • Nsukami Patrick's avatar
      Fix Argument 1 to "__call__" of "TranslationFunction" has incompatible type · c03be5e0a47c
      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.
      c03be5e0a47c
    • Nsukami Patrick's avatar
      refactor(mypy): Improve type hints inside OperatorExpressionMixin class · 947a89a37413
      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
      947a89a37413
    • Nsukami Patrick's avatar
      refactor(mypy): Improve HSMixin type hints · 97efc3ea82ca
      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
      97efc3ea82ca
  19. 11 Oct, 2021 2 commits
    • Nsukami Patrick's avatar
      refactor: Update the shell script that build wheels · 045e097fcfb3
      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.
      045e097fcfb3
    • Nsukami Patrick's avatar
      refactor: Replace makefile with tox · 2611826b013d
      Nsukami Patrick authored
      2611826b013d
  20. 05 Oct, 2021 1 commit
  21. 03 Oct, 2021 1 commit