I want to automatically generate a UML class diagram based on my Python(3) source code. The challenge in this case is that not all information is available at the time of instantiation of the object. Some attributes have to be assigned later, therefore when the object is initially created, some attributes are of type None. Later they will have the type that is hinted at. Now I want the UML to show the type of the hinting not the type that is initially assigned at object creation.
The following source:
from typing import List
class Test:
def __init__(self):
self.a: int = 0
self.b: List[str] = None
produces the following UML:
Now I want for attribute b to have the type List[str] in the UML and override what pylint thinks will be the type of b. Is there a way to achive this or do I have to manually draw my UML?
Thank you very much :).