Skip to content

Commit

Permalink
This change enhances compatibility with Pydantic V2 and streamlines e…
Browse files Browse the repository at this point in the history
…rror handling.
  • Loading branch information
gabino committed Dec 27, 2024
1 parent b4cbfb0 commit eb8ae3c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
11 changes: 0 additions & 11 deletions clabe/errors.py

This file was deleted.

21 changes: 0 additions & 21 deletions clabe/types.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
from typing import Any, ClassVar, Dict, Type

<<<<<<< HEAD
from pydantic.v1.errors import NotDigitError
from pydantic.v1.validators import (
constr_length_validator,
constr_strip_whitespace,
str_validator,
)
=======
from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler
from pydantic_core import PydanticCustomError, core_schema
>>>>>>> 3f790a9 (Upgrade Python version requirements and dependencies)

from .validations import BANK_NAMES, BANKS, compute_control_digit

<<<<<<< HEAD
if TYPE_CHECKING:
from pydantic.v1.typing import CallableGenerator


def validate_digits(v: str) -> str:
if not v.isdigit():
raise NotDigitError
return v

=======
>>>>>>> 3f790a9 (Upgrade Python version requirements and dependencies)

class Clabe(str):
"""
Expand Down
2 changes: 1 addition & 1 deletion clabe/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.0.dev0'
__version__ = '2.0.0.dev0'

0 comments on commit eb8ae3c

Please sign in to comment.