Skip to content
Snippets Groups Projects
Unverified Commit b036a169 authored by Florian Maurer's avatar Florian Maurer Committed by GitHub
Browse files

Fixup mermaid er cardinalities (#144)

parents 6e003f83 e2c330eb
No related branches found
No related tags found
No related merge requests found
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
......@@ -10,7 +10,7 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
stages: [commit]
stages: [pre-commit]
additional_dependencies:
- tomli
......@@ -18,12 +18,12 @@ repos:
rev: v3.1.0
hooks:
- id: prettier
stages: [commit]
stages: [pre-commit]
exclude: tests\/test_.+\.
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.4
rev: v0.7.4
hooks:
# Run the linter.
- id: ruff
......
......@@ -204,12 +204,8 @@ class Relation(Drawable):
return '{} "{}" -- "{}" {}'.format(*normalized)
def to_mermaid_er(self) -> str:
left = Relation.cardinalities_crowfoot.get(
self.left_cardinality,
)
right = Relation.cardinalities_crowfoot.get(
self.right_cardinality,
)
left = Relation.cardinalities_crowfoot.get(self.left_cardinality, self.left_cardinality)
right = Relation.cardinalities_crowfoot.get(self.right_cardinality, self.right_cardinality)
left_col = sanitize_mermaid(self.left_table, is_er=True)
right_col = sanitize_mermaid(self.right_table, is_er=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment