-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
enhancementNew feature or requestNew feature or request
Description
py2puml fails to inspect a dataclass using Optional as follows:
from dataclasses import dataclass
from typing import Optional
@dataclass
class MyData:
data: Optional[bool]ValueError: Could not resolve type typing.Union in module <module 'tests.modules.withoptional' from '.../py2puml/tests/modules/withoptional.py'>: it needs to be imported explicitly.
It is because Optional[bool] is dynamically converted into Union[bool, None] without adding both typing.Union and typing.Nonetype in the module wrapped by the ModuleResolver.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request