From 2f300bccf31e7d8914817cac2ca466fd2a0a4d08 Mon Sep 17 00:00:00 2001 From: Mehdi Samsami Date: Tue, 25 Jun 2024 11:24:13 +0330 Subject: [PATCH] move to a new directory for crypto addresses validators --- src/validators/__init__.py | 5 +---- src/validators/crypto_addresses/__init__.py | 1 + src/validators/{ => crypto_addresses}/btc_address.py | 2 +- tests/crypto_addresses/__init__.py | 1 + tests/{ => crypto_addresses}/test_btc_address.py | 0 5 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 src/validators/crypto_addresses/__init__.py rename src/validators/{ => crypto_addresses}/btc_address.py (97%) create mode 100644 tests/crypto_addresses/__init__.py rename tests/{ => crypto_addresses}/test_btc_address.py (100%) diff --git a/src/validators/__init__.py b/src/validators/__init__.py index f212d30f..02e3ba95 100644 --- a/src/validators/__init__.py +++ b/src/validators/__init__.py @@ -2,10 +2,10 @@ # local from .between import between -from .btc_address import btc_address from .card import amex, card_number, diners, discover, jcb, mastercard, unionpay, visa from .country import calling_code, country_code, currency from .cron import cron +from .crypto_addresses.btc_address import btc_address from .domain import domain from .email import email from .encoding import base58, base64 @@ -33,12 +33,9 @@ from .utils import ValidationError, validator from .uuid import uuid -# from .crypto_addresses import eth_address - __all__ = ( # ... "between", - # crypto_addresses "btc_address", # cards "amex", diff --git a/src/validators/crypto_addresses/__init__.py b/src/validators/crypto_addresses/__init__.py new file mode 100644 index 00000000..ba38e629 --- /dev/null +++ b/src/validators/crypto_addresses/__init__.py @@ -0,0 +1 @@ +"""Crypto addresses.""" diff --git a/src/validators/btc_address.py b/src/validators/crypto_addresses/btc_address.py similarity index 97% rename from src/validators/btc_address.py rename to src/validators/crypto_addresses/btc_address.py index 409a22fb..8c4aa453 100644 --- a/src/validators/btc_address.py +++ b/src/validators/crypto_addresses/btc_address.py @@ -5,7 +5,7 @@ import re # local -from .utils import validator +from validators.utils import validator def _decode_base58(addr: str): diff --git a/tests/crypto_addresses/__init__.py b/tests/crypto_addresses/__init__.py new file mode 100644 index 00000000..737550be --- /dev/null +++ b/tests/crypto_addresses/__init__.py @@ -0,0 +1 @@ +"""Test crypto addresses.""" diff --git a/tests/test_btc_address.py b/tests/crypto_addresses/test_btc_address.py similarity index 100% rename from tests/test_btc_address.py rename to tests/crypto_addresses/test_btc_address.py