Skip to content

Commit

Permalink
Merge branch 'main' into py13
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi authored Oct 18, 2024
2 parents 26e9477 + cac87b9 commit 92721b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion erdantic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing_extensions import Self

import pydantic
import pygraphviz as pgv # type: ignore [import-not-found]
import pygraphviz as pgv # type: ignore [import-untyped, import-not-found]
from sortedcontainers_pydantic import SortedDict
from typenames import REMOVE_ALL_MODULES, typenames

Expand Down
4 changes: 2 additions & 2 deletions erdantic/plugins/dataclasses.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dataclasses
import re
import sys
from typing import TYPE_CHECKING, Any, List, Type, get_type_hints
from typing import TYPE_CHECKING, Any, List, Type, cast, get_type_hints

if sys.version_info >= (3, 9):
# include_extras was added in Python 3.9
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_fields_from_dataclass(model: DataclassType) -> List[FieldInfo]:
FieldInfo.from_raw_type(
model_full_name=FullyQualifiedName.from_object(model),
name=f.name,
raw_type=f.type,
raw_type=cast(type, f.type), # cast narrows type for typechecking
)
for f in dataclasses.fields(model)
]
Expand Down

0 comments on commit 92721b1

Please sign in to comment.