-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ModuleNotFoundError if attrs is not installed when importing exam…
…ples (#113) * Fix ModuleNotFoundError if attrs is not installed * Bump version --------- Co-authored-by: Jay Qi <[email protected]>
- Loading branch information
Showing
4 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
"""Example data model classes.""" | ||
|
||
from erdantic.examples import attrs, dataclasses, pydantic, pydantic_v1 | ||
from erdantic.examples import dataclasses, pydantic, pydantic_v1 | ||
|
||
__all__ = [ | ||
"attrs", | ||
"dataclasses", | ||
"pydantic", | ||
"pydantic_v1", | ||
] | ||
|
||
try: | ||
from erdantic.examples import attrs | ||
|
||
attrs | ||
__all__.append("attrs") | ||
except ModuleNotFoundError as e: | ||
if e.name != "attrs": | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "erdantic" | ||
version = "1.0.0.post2" | ||
version = "1.0.1" | ||
description = "Entity relationship diagrams for Python data model classes like Pydantic." | ||
readme = "README.md" | ||
authors = [{ name = "DrivenData", email = "[email protected]" }, { name = "Jay Qi" }] | ||
|