Skip to content

Commit

Permalink
chore: Prepare for 0.19.1 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCardin committed May 10, 2024
1 parent 89de5d2 commit 5de6984
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.19

### 0.19.1

- fix: Eagerly attempt pydantic BaseModel import to ensure its skipped if unavailable.

### 0.19.0

- feat: Add support for `msgspec` based class definitions.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cappa"
version = "0.19.0"
version = "0.19.1"
description = "Declarative CLI argument parser."

repository = "https://github.com/dancardin/cappa"
Expand Down
6 changes: 2 additions & 4 deletions src/cappa/class_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,13 @@ def from_cls(cls, obj: type) -> ClassTypes | None:
return cls.msgspec

try:
from pydantic import BaseModel
import pydantic
from pydantic import BaseModel
except ImportError: # pragma: no cover
pass
else:
try:
is_base_model = isinstance(obj, type) and issubclass(
obj, BaseModel
)
is_base_model = isinstance(obj, type) and issubclass(obj, BaseModel)
except TypeError: # pragma: no cover
is_base_model = False

Expand Down

0 comments on commit 5de6984

Please sign in to comment.