Commit d1dbda21 authored by Nsukami Patrick's avatar Nsukami Patrick
Browse files

[mypy]: Fix various errors related to the description attribute

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())
parent f0ce6b51539b
Pipeline #100263 passed with stages
in 1 minute and 7 seconds
......@@ -214,7 +214,7 @@ class Definition(object, metaclass=autopackage):
"""Abstract class for entity / relation definition classes."""
meta = MARKER
description = MARKER
description: Union[nullobject, str, None] = MARKER
__permissions__ = MARKER
def __init__(self, name=None) -> None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment