1. 16 Dec, 2021 3 commits
    • Nsukami Patrick's avatar
      [mypy]: Fix various errors related to the description attribute · b9359ad53cea
      Nsukami Patrick authored
      Updates:
      --------
      - Inside Definition class, annotate description attribute as Union of nullobject, str, None
      
      
      And fix the following errors:
      -----------------------------
      yams/buildobjs.py:226: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		self.description = " ".join(self.__doc__.split())
      
      yams/buildobjs.py:894: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		cls.description = " ".join(cls.__doc__.split())
      b9359ad53cea
    • Nsukami Patrick's avatar
      [mypy] Fix various errors related to subject & object attributes · f0ce6b51539b
      Nsukami Patrick authored
      Updates:
      --------
      - Annotate subject attribute as a Union of nullobject, str, None
      - Annotate object attribute as a Union of nullobject, str, None
      
      
      And fix the following errors:
      -----------------------------
      yams/buildobjs.py:966: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		self.subject = subject
      			       ^
      yams/buildobjs.py:971: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		self.object = object
      
      yams/buildobjs.py:603: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      				relation_definition.subject = name
      							      ^
      yams/buildobjs.py:606: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      				relation_definition.object = name
      f0ce6b51539b
    • Nsukami Patrick's avatar
      [mypy]: Fix various errors · c312ff9d2c1b
      Nsukami Patrick authored
      Updates:
      --------
      - Annotate cardinality attribute as a Union of nullobject, str, None.
      - assert cardinality is an instance of str if not an instance of nullobject
      
      
      To fix the following errors:
      ----------------------------
      yams/buildobjs.py:1071: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		    self.cardinality = "?1"
      				       ^
      yams/buildobjs.py:1073: error: Incompatible types in assignment (expression has type "str", variable has type "nullobject")  [assignment]
      		    self.cardinality = "**"
      				       ^
      yams/buildobjs.py:1075: error: Argument 1 to "len" has incompatible type "nullobject"; expected "Sized"  [arg-type]
      		assert len(cardinality) == 2
      			   ^
      yams/buildobjs.py:1076: error: Value of type "nullobject" is not indexable  [index]
      		assert cardinality[0] in "1?+*"
      		       ^
      yams/buildobjs.py:1077: error: Value of type "nullobject" is not indexable  [index]
      		assert cardinality[1] in "1?+*"
      c312ff9d2c1b
  2. 07 Dec, 2021 1 commit
  3. 10 Dec, 2021 2 commits
  4. 08 Dec, 2021 1 commit
    • Nsukami Patrick's avatar
      [mypy] Fix error: "type" has no attribute "type" · 6b294384c1ee
      Nsukami Patrick authored
      Error:
      yams/constraints.py:461: error: "type" has no attribute "type"
          BoundConstraint.type = lambda x: "BoundaryConstraint"
      
      Fix:
      Add a method named "type" inside the BoundaryConstraint class.
      This method should explicitely return the string "BoundaryConstraint".
      Finally, remove the dynamically added type attribute
      6b294384c1ee
  5. 26 Nov, 2021 4 commits
  6. 16 Nov, 2021 2 commits
  7. 10 Nov, 2021 1 commit
  8. 28 Jul, 2021 6 commits
  9. 21 Apr, 2021 1 commit
  10. 24 Feb, 2021 1 commit
  11. 17 Feb, 2021 3 commits
  12. 25 Sep, 2020 2 commits
  13. 22 Jul, 2020 1 commit
  14. 07 Jul, 2020 1 commit
  15. 25 Jun, 2020 1 commit
  16. 07 May, 2020 1 commit
  17. 29 Apr, 2020 4 commits
  18. 23 Jun, 2020 1 commit
  19. 02 Jun, 2020 2 commits
  20. 27 May, 2020 2 commits