Skip to content

Commit eb8ae3c

Browse files
author
gabino
committed
This change enhances compatibility with Pydantic V2 and streamlines error handling.
1 parent b4cbfb0 commit eb8ae3c

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

clabe/errors.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

clabe/types.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
from typing import Any, ClassVar, Dict, Type
22

3-
<<<<<<< HEAD
4-
from pydantic.v1.errors import NotDigitError
5-
from pydantic.v1.validators import (
6-
constr_length_validator,
7-
constr_strip_whitespace,
8-
str_validator,
9-
)
10-
=======
113
from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler
124
from pydantic_core import PydanticCustomError, core_schema
13-
>>>>>>> 3f790a9 (Upgrade Python version requirements and dependencies)
145

156
from .validations import BANK_NAMES, BANKS, compute_control_digit
167

17-
<<<<<<< HEAD
18-
if TYPE_CHECKING:
19-
from pydantic.v1.typing import CallableGenerator
20-
21-
22-
def validate_digits(v: str) -> str:
23-
if not v.isdigit():
24-
raise NotDigitError
25-
return v
26-
27-
=======
28-
>>>>>>> 3f790a9 (Upgrade Python version requirements and dependencies)
298

309
class Clabe(str):
3110
"""

clabe/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.0.dev0'
1+
__version__ = '2.0.0.dev0'

0 commit comments

Comments
 (0)