Describe the bug
mkdocs-dbml raises an exception pointing to
because the column type is Enum which doesn't implement
len.
To reproduce
- Add plugin to
mkdocs.yml: ...
- Put DBML containing enums in a page
- Run
mkdocs serve
- See error / wrong diagram
Expected behavior
DBML tables rendered.
Environment
- OS: Linux, but should happen on any.
- Python: 3.13, but should happen on any
- MkDocs: 1.6.1
- mkdocs-dbml-plugin: Latest, but appears to be present as far back as 1.0.0
Additional context
The type of columns is defined to be str | Enum at https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/_classes/column.py#L25
It it converted from string form to Enum in https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/parser/blueprints.py#L146
Enums implement str (https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/_classes/enum.py#L81) and str.str reflexively returns itself so type_text = str(column.type) should fix that.
Describe the bug
mkdocs-dbml raises an exception pointing to
mkdocs-dbml/mkdocs_dbml_plugin/renderer.py
Line 391 in 8a59d9f
To reproduce
mkdocs.yml:...mkdocs serveExpected behavior
DBML tables rendered.
Environment
Additional context
The type of columns is defined to be str | Enum at https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/_classes/column.py#L25
It it converted from string form to Enum in https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/parser/blueprints.py#L146
Enums implement str (https://github.com/Vanderhoof/PyDBML/blob/04d19974193a9bb173436dab53b94ecc2919fd58/pydbml/_classes/enum.py#L81) and str.str reflexively returns itself so
type_text = str(column.type)should fix that.