mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-15 06:38:42 +00:00
Use pydantic.v1 namespace on all pydantic versions (#883)
With https://github.com/pydantic/pydantic/pull/9042 being shipped with [1.10.15](https://docs.pydantic.dev/latest/changelog/#v11015-2024-04-03), we can clean up the imports a bit until we make decisions how to move onward with or without pydantic. --------- Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ from pprint import pformat as pf
|
||||
from typing import Any, cast
|
||||
|
||||
import asyncclick as click
|
||||
from pydantic.v1 import ValidationError
|
||||
|
||||
from kasa import (
|
||||
AuthenticationError,
|
||||
@@ -42,11 +43,6 @@ from kasa.iot import (
|
||||
from kasa.iot.modules import Usage
|
||||
from kasa.smart import SmartDevice
|
||||
|
||||
try:
|
||||
from pydantic.v1 import ValidationError
|
||||
except ImportError:
|
||||
from pydantic import ValidationError
|
||||
|
||||
try:
|
||||
from rich import print as _do_echo
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user