Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: rectifies changelog #336

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml.bkp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
yozachar marked this conversation as resolved.
Show resolved Hide resolved
# set up specific python version
- name: Set up Python v3.11
- name: Set up Python v3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
# building
- name: Install 'documentation' dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pycqa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
# checkout repository again!
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ cython_debug/
# asdf
.tool-versions

# rtx
# rtx/mise
.rtx.toml
.mise.toml

# ruff
.ruff_cache
194 changes: 122 additions & 72 deletions CHANGES.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ True
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
[docs-badge]: https://github.com/python-validators/validators/actions/workflows/docs.yaml/badge.svg
[docs-link]: https://github.com/python-validators/validators/actions/workflows/docs.yaml
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
[vs-link]: https://pypi.python.org/pypi/validators/
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ True
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
[docs-badge]: https://github.com/python-validators/validators/actions/workflows/docs.yaml/badge.svg
[docs-link]: https://github.com/python-validators/validators/actions/workflows/docs.yaml
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
[vs-link]: https://pypi.python.org/pypi/validators/
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ typeCheckingMode = "strict"
pythonpath = ["src"]

[tool.ruff]
select = [
lint.select = [
# Pyflakes
"F",
# pycodestyle
Expand All @@ -139,15 +139,15 @@ line-length = 100
target-version = "py38"
extend-exclude = ["**/__pycache__", ".pytest_cache", "site"]

[tool.ruff.isort]
[tool.ruff.lint.isort]
# case-sensitive = true
combine-as-imports = true
force-sort-within-sections = true
force-wrap-aliases = true
known-local-folder = ["src"]
relative-imports-order = "closest-to-furthest"

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.tox]
Expand Down
4 changes: 0 additions & 4 deletions src/validators/_extremes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class AbsMax:
# Output: True
>>> AbsMax > 99999999999999999
# Output: True

> *New in version 0.2.0*.
"""

def __ge__(self, other: Any):
Expand All @@ -42,8 +40,6 @@ class AbsMin:
# Output: True
>>> AbsMin < ''
# Output: True

> *New in version 0.2.0*.
"""

def __le__(self, other: Any):
Expand Down
2 changes: 0 additions & 2 deletions src/validators/btc_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ def btc_address(value: str, /):
If `value` is a valid bitcoin address.
(ValidationError):
If `value` is an invalid bitcoin address.

> *New in version 0.18.0*.
"""
if not value:
return False
Expand Down
16 changes: 0 additions & 16 deletions src/validators/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def card_number(value: str, /):
If `value` is a valid generic card number.
(ValidationError):
If `value` is an invalid generic card number.

> *New in version 0.15.0*.
"""
if not value:
return False
Expand Down Expand Up @@ -63,8 +61,6 @@ def visa(value: str, /):
If `value` is a valid Visa card number.
(ValidationError):
If `value` is an invalid Visa card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^4")
return card_number(value) and len(value) == 16 and pattern.match(value)
Expand All @@ -89,8 +85,6 @@ def mastercard(value: str, /):
If `value` is a valid Mastercard card number.
(ValidationError):
If `value` is an invalid Mastercard card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^(51|52|53|54|55|22|23|24|25|26|27)")
return card_number(value) and len(value) == 16 and pattern.match(value)
Expand All @@ -115,8 +109,6 @@ def amex(value: str, /):
If `value` is a valid American Express card number.
(ValidationError):
If `value` is an invalid American Express card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^(34|37)")
return card_number(value) and len(value) == 15 and pattern.match(value)
Expand All @@ -141,8 +133,6 @@ def unionpay(value: str, /):
If `value` is a valid UnionPay card number.
(ValidationError):
If `value` is an invalid UnionPay card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^62")
return card_number(value) and len(value) == 16 and pattern.match(value)
Expand All @@ -167,8 +157,6 @@ def diners(value: str, /):
If `value` is a valid Diners Club card number.
(ValidationError):
If `value` is an invalid Diners Club card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^(30|36|38|39)")
return card_number(value) and len(value) in {14, 16} and pattern.match(value)
Expand All @@ -193,8 +181,6 @@ def jcb(value: str, /):
If `value` is a valid JCB card number.
(ValidationError):
If `value` is an invalid JCB card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^35")
return card_number(value) and len(value) == 16 and pattern.match(value)
Expand All @@ -219,8 +205,6 @@ def discover(value: str, /):
If `value` is a valid Discover card number.
(ValidationError):
If `value` is an invalid Discover card number.

> *New in version 0.15.0*.
"""
pattern = re.compile(r"^(60|64|65)")
return card_number(value) and len(value) == 16 and pattern.match(value)
6 changes: 0 additions & 6 deletions src/validators/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ def domain(value: str, /, *, rfc_1034: bool = False, rfc_2782: bool = False):
If `value` is a valid domain name.
(ValidationError):
If `value` is an invalid domain name.

Note:
- *In version 0.10.0*:
- Added support for internationalized domain name (IDN) validation.

> *New in version 0.9.0*.
"""
if not value:
return False
Expand Down
2 changes: 0 additions & 2 deletions src/validators/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def email(
If `value` is a valid eMail.
(ValidationError):
If `value` is an invalid eMail.

> *New in version 0.1.0*.
"""
if not value or value.count("@") != 1:
return False
Expand Down
10 changes: 0 additions & 10 deletions src/validators/hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def md5(value: str, /):
If `value` is a valid MD5 hash.
(ValidationError):
If `value` is an invalid MD5 hash.

> *New in version 0.12.1*
"""
return re.match(r"^[0-9a-f]{32}$", value, re.IGNORECASE) if value else False

Expand All @@ -51,8 +49,6 @@ def sha1(value: str, /):
If `value` is a valid SHA1 hash.
(ValidationError):
If `value` is an invalid SHA1 hash.

> *New in version 0.12.1*
"""
return re.match(r"^[0-9a-f]{40}$", value, re.IGNORECASE) if value else False

Expand All @@ -76,8 +72,6 @@ def sha224(value: str, /):
If `value` is a valid SHA224 hash.
(ValidationError):
If `value` is an invalid SHA224 hash.

> *New in version 0.12.1*
"""
return re.match(r"^[0-9a-f]{56}$", value, re.IGNORECASE) if value else False

Expand All @@ -104,8 +98,6 @@ def sha256(value: str, /):
If `value` is a valid SHA256 hash.
(ValidationError):
If `value` is an invalid SHA256 hash.

> *New in version 0.12.1*
"""
return re.match(r"^[0-9a-f]{64}$", value, re.IGNORECASE) if value else False

Expand Down Expand Up @@ -133,7 +125,5 @@ def sha512(value: str, /):
If `value` is a valid SHA512 hash.
(ValidationError):
If `value` is an invalid SHA512 hash.

> *New in version 0.12.1*
"""
return re.match(r"^[0-9a-f]{128}$", value, re.IGNORECASE) if value else False
2 changes: 0 additions & 2 deletions src/validators/hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ def hostname(
If `value` is a valid hostname.
(ValidationError):
If `value` is an invalid hostname.

> *New in version 0.21.0*.
"""
if not value:
return False
Expand Down
8 changes: 0 additions & 8 deletions src/validators/i18n/es.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ def es_cif(value: str, /):
If `value` is a valid DOI string.
(ValidationError):
If `value` is an invalid DOI string.

> *New in version 0.13.0*.
"""
if not value or len(value) != 9:
return False
Expand Down Expand Up @@ -108,8 +106,6 @@ def es_nif(value: str, /):
If `value` is a valid DOI string.
(ValidationError):
If `value` is an invalid DOI string.

> *New in version 0.13.0*.
"""
number_by_letter = {"L": "0", "M": "0", "K": "0"}
special_cases = {"X0000000T", "00000000T", "00000001R"}
Expand Down Expand Up @@ -143,8 +139,6 @@ def es_nie(value: str, /):
If `value` is a valid DOI string.
(ValidationError):
If `value` is an invalid DOI string.

> *New in version 0.13.0*.
"""
number_by_letter = {"X": "0", "Y": "1", "Z": "2"}
# NIE must must start with X Y or Z
Expand Down Expand Up @@ -179,7 +173,5 @@ def es_doi(value: str, /):
If `value` is a valid DOI string.
(ValidationError):
If `value` is an invalid DOI string.

> *New in version 0.13.0*.
"""
return es_nie(value) or es_nif(value) or es_cif(value)
8 changes: 0 additions & 8 deletions src/validators/i18n/fi.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ def fi_business_id(value: str, /):
If `value` is a valid finnish business id.
(ValidationError):
If `value` is an invalid finnish business id.

Note:
- *In version 0.5.0*:
- Function renamed from `finnish_business_id` to `fi_business_id`

> *New in version 0.4.0*.
"""
if not value:
return False
Expand Down Expand Up @@ -100,8 +94,6 @@ def fi_ssn(value: str, /, *, allow_temporal_ssn: bool = True):
If `value` is a valid finnish SSN.
(ValidationError):
If `value` is an invalid finnish SSN.

> *New in version 0.5.0*.
"""
if not value:
return False
Expand Down
4 changes: 0 additions & 4 deletions src/validators/i18n/fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def fr_department(value: typing.Union[str, int]):
If `value` is a valid french department number.
(ValidationError):
If `value` is an invalid french department number.

> *New in version 0.23.0*.
"""
if not value:
return False
Expand Down Expand Up @@ -96,8 +94,6 @@ def fr_ssn(value: str):
If `value` is a valid french Social Security Number.
(ValidationError):
If `value` is an invalid french Social Security Number.

> *New in version 0.23.0*.
"""
if not value:
return False
Expand Down
2 changes: 0 additions & 2 deletions src/validators/iban.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def iban(value: str, /):
If `value` is a valid IBAN code.
(ValidationError):
If `value` is an invalid IBAN code.

> *New in version 0.8.0*
"""
return (
(re.match(r"^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", value) and _mod_check(value))
Expand Down
12 changes: 0 additions & 12 deletions src/validators/ip_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ def ipv4(value: str, /, *, cidr: bool = True, strict: bool = False, host_bit: bo
If `value` is a valid IPv4 address.
(ValidationError):
If `value` is an invalid IPv4 address.

Note:
- *In version 0.14.0*:
- Add supports for CIDR notation

> *New in version 0.2.0*
"""
if not value:
return False
Expand Down Expand Up @@ -102,12 +96,6 @@ def ipv6(value: str, /, *, cidr: bool = True, strict: bool = False, host_bit: bo
If `value` is a valid IPv6 address.
(ValidationError):
If `value` is an invalid IPv6 address.

Note:
- *In version 0.14.0*:
- Add supports for CIDR notation

> *New in version 0.2.0*
"""
if not value:
return False
Expand Down
2 changes: 0 additions & 2 deletions src/validators/mac_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@ def mac_address(value: str, /):
If `value` is a valid MAC address.
(ValidationError):
If `value` is an invalid MAC address.

> *New in version 0.2.0*.
"""
return re.match(r"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$", value) if value else False
2 changes: 0 additions & 2 deletions src/validators/slug.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ def slug(value: str, /):
If `value` is a valid slug.
(ValidationError):
If `value` is an invalid slug.

> *New in version 0.6.0*.
"""
return re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value) if value else False
Loading
Loading