Skip to content

Commit 245bffd

Browse files
authored
Merge pull request #336 from yozachar/workshop
maint: rectifies changelog
2 parents c2d3fb7 + e77d571 commit 245bffd

24 files changed

+136
-182
lines changed

.github/workflows/docs.yaml.bkp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v3
1919
# set up specific python version
20-
- name: Set up Python v3.11
20+
- name: Set up Python v3.12
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.11"
23+
python-version: "3.12"
2424
# building
2525
- name: Install 'documentation' dependencies
2626
run: |

.github/workflows/pycqa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
fail-fast: true
3636
matrix:
3737
os: [ubuntu-latest, macos-latest, windows-latest]
38-
python-version: ["3.8", "3.9", "3.10", "3.11"]
38+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3939
runs-on: ${{ matrix.os }}
4040
steps:
4141
# checkout repository again!

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ cython_debug/
173173
# asdf
174174
.tool-versions
175175

176-
# rtx
176+
# rtx/mise
177177
.rtx.toml
178+
.mise.toml
178179

179180
# ruff
180181
.ruff_cache

CHANGES.md

Lines changed: 122 additions & 72 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ True
3333
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
3434
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
3535
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
36-
[docs-badge]: https://github.com/python-validators/validators/actions/workflows/docs.yaml/badge.svg
37-
[docs-link]: https://github.com/python-validators/validators/actions/workflows/docs.yaml
36+
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
37+
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
3838
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
3939
[vs-link]: https://pypi.python.org/pypi/validators/
4040
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ True
3333
[sast-link]: https://github.com/python-validators/validators/actions/workflows/sast.yaml
3434
[pycqa-badge]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml/badge.svg
3535
[pycqa-link]: https://github.com/python-validators/validators/actions/workflows/pycqa.yaml
36-
[docs-badge]: https://github.com/python-validators/validators/actions/workflows/docs.yaml/badge.svg
37-
[docs-link]: https://github.com/python-validators/validators/actions/workflows/docs.yaml
36+
[docs-badge]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment/badge.svg
37+
[docs-link]: https://github.com/yozachar/pyvalidators/actions/workflows/pages/pages-build-deployment
3838
[vs-badge]: https://img.shields.io/pypi/v/validators?logo=pypi&logoColor=white&label=version&color=blue
3939
[vs-link]: https://pypi.python.org/pypi/validators/
4040
[dw-badge]: https://img.shields.io/pypi/dm/validators?logo=pypi&logoColor=white&color=blue

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ typeCheckingMode = "strict"
120120
pythonpath = ["src"]
121121

122122
[tool.ruff]
123-
select = [
123+
lint.select = [
124124
# Pyflakes
125125
"F",
126126
# pycodestyle
@@ -139,15 +139,15 @@ line-length = 100
139139
target-version = "py38"
140140
extend-exclude = ["**/__pycache__", ".pytest_cache", "site"]
141141

142-
[tool.ruff.isort]
142+
[tool.ruff.lint.isort]
143143
# case-sensitive = true
144144
combine-as-imports = true
145145
force-sort-within-sections = true
146146
force-wrap-aliases = true
147147
known-local-folder = ["src"]
148148
relative-imports-order = "closest-to-furthest"
149149

150-
[tool.ruff.pydocstyle]
150+
[tool.ruff.lint.pydocstyle]
151151
convention = "google"
152152

153153
[tool.tox]

src/validators/_extremes.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class AbsMax:
1919
# Output: True
2020
>>> AbsMax > 99999999999999999
2121
# Output: True
22-
23-
> *New in version 0.2.0*.
2422
"""
2523

2624
def __ge__(self, other: Any):
@@ -42,8 +40,6 @@ class AbsMin:
4240
# Output: True
4341
>>> AbsMin < ''
4442
# Output: True
45-
46-
> *New in version 0.2.0*.
4743
"""
4844

4945
def __le__(self, other: Any):

src/validators/btc_address.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def btc_address(value: str, /):
4646
If `value` is a valid bitcoin address.
4747
(ValidationError):
4848
If `value` is an invalid bitcoin address.
49-
50-
> *New in version 0.18.0*.
5149
"""
5250
if not value:
5351
return False

src/validators/card.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def card_number(value: str, /):
3030
If `value` is a valid generic card number.
3131
(ValidationError):
3232
If `value` is an invalid generic card number.
33-
34-
> *New in version 0.15.0*.
3533
"""
3634
if not value:
3735
return False
@@ -63,8 +61,6 @@ def visa(value: str, /):
6361
If `value` is a valid Visa card number.
6462
(ValidationError):
6563
If `value` is an invalid Visa card number.
66-
67-
> *New in version 0.15.0*.
6864
"""
6965
pattern = re.compile(r"^4")
7066
return card_number(value) and len(value) == 16 and pattern.match(value)
@@ -89,8 +85,6 @@ def mastercard(value: str, /):
8985
If `value` is a valid Mastercard card number.
9086
(ValidationError):
9187
If `value` is an invalid Mastercard card number.
92-
93-
> *New in version 0.15.0*.
9488
"""
9589
pattern = re.compile(r"^(51|52|53|54|55|22|23|24|25|26|27)")
9690
return card_number(value) and len(value) == 16 and pattern.match(value)
@@ -115,8 +109,6 @@ def amex(value: str, /):
115109
If `value` is a valid American Express card number.
116110
(ValidationError):
117111
If `value` is an invalid American Express card number.
118-
119-
> *New in version 0.15.0*.
120112
"""
121113
pattern = re.compile(r"^(34|37)")
122114
return card_number(value) and len(value) == 15 and pattern.match(value)
@@ -141,8 +133,6 @@ def unionpay(value: str, /):
141133
If `value` is a valid UnionPay card number.
142134
(ValidationError):
143135
If `value` is an invalid UnionPay card number.
144-
145-
> *New in version 0.15.0*.
146136
"""
147137
pattern = re.compile(r"^62")
148138
return card_number(value) and len(value) == 16 and pattern.match(value)
@@ -167,8 +157,6 @@ def diners(value: str, /):
167157
If `value` is a valid Diners Club card number.
168158
(ValidationError):
169159
If `value` is an invalid Diners Club card number.
170-
171-
> *New in version 0.15.0*.
172160
"""
173161
pattern = re.compile(r"^(30|36|38|39)")
174162
return card_number(value) and len(value) in {14, 16} and pattern.match(value)
@@ -193,8 +181,6 @@ def jcb(value: str, /):
193181
If `value` is a valid JCB card number.
194182
(ValidationError):
195183
If `value` is an invalid JCB card number.
196-
197-
> *New in version 0.15.0*.
198184
"""
199185
pattern = re.compile(r"^35")
200186
return card_number(value) and len(value) == 16 and pattern.match(value)
@@ -219,8 +205,6 @@ def discover(value: str, /):
219205
If `value` is a valid Discover card number.
220206
(ValidationError):
221207
If `value` is an invalid Discover card number.
222-
223-
> *New in version 0.15.0*.
224208
"""
225209
pattern = re.compile(r"^(60|64|65)")
226210
return card_number(value) and len(value) == 16 and pattern.match(value)

src/validators/domain.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ def domain(value: str, /, *, rfc_1034: bool = False, rfc_2782: bool = False):
3636
If `value` is a valid domain name.
3737
(ValidationError):
3838
If `value` is an invalid domain name.
39-
40-
Note:
41-
- *In version 0.10.0*:
42-
- Added support for internationalized domain name (IDN) validation.
43-
44-
> *New in version 0.9.0*.
4539
"""
4640
if not value:
4741
return False

src/validators/email.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ def email(
5656
If `value` is a valid eMail.
5757
(ValidationError):
5858
If `value` is an invalid eMail.
59-
60-
> *New in version 0.1.0*.
6159
"""
6260
if not value or value.count("@") != 1:
6361
return False

src/validators/hashes.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def md5(value: str, /):
2626
If `value` is a valid MD5 hash.
2727
(ValidationError):
2828
If `value` is an invalid MD5 hash.
29-
30-
> *New in version 0.12.1*
3129
"""
3230
return re.match(r"^[0-9a-f]{32}$", value, re.IGNORECASE) if value else False
3331

@@ -51,8 +49,6 @@ def sha1(value: str, /):
5149
If `value` is a valid SHA1 hash.
5250
(ValidationError):
5351
If `value` is an invalid SHA1 hash.
54-
55-
> *New in version 0.12.1*
5652
"""
5753
return re.match(r"^[0-9a-f]{40}$", value, re.IGNORECASE) if value else False
5854

@@ -76,8 +72,6 @@ def sha224(value: str, /):
7672
If `value` is a valid SHA224 hash.
7773
(ValidationError):
7874
If `value` is an invalid SHA224 hash.
79-
80-
> *New in version 0.12.1*
8175
"""
8276
return re.match(r"^[0-9a-f]{56}$", value, re.IGNORECASE) if value else False
8377

@@ -104,8 +98,6 @@ def sha256(value: str, /):
10498
If `value` is a valid SHA256 hash.
10599
(ValidationError):
106100
If `value` is an invalid SHA256 hash.
107-
108-
> *New in version 0.12.1*
109101
"""
110102
return re.match(r"^[0-9a-f]{64}$", value, re.IGNORECASE) if value else False
111103

@@ -133,7 +125,5 @@ def sha512(value: str, /):
133125
If `value` is a valid SHA512 hash.
134126
(ValidationError):
135127
If `value` is an invalid SHA512 hash.
136-
137-
> *New in version 0.12.1*
138128
"""
139129
return re.match(r"^[0-9a-f]{128}$", value, re.IGNORECASE) if value else False

src/validators/hostname.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ def hostname(
104104
If `value` is a valid hostname.
105105
(ValidationError):
106106
If `value` is an invalid hostname.
107-
108-
> *New in version 0.21.0*.
109107
"""
110108
if not value:
111109
return False

src/validators/i18n/es.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ def es_cif(value: str, /):
5252
If `value` is a valid DOI string.
5353
(ValidationError):
5454
If `value` is an invalid DOI string.
55-
56-
> *New in version 0.13.0*.
5755
"""
5856
if not value or len(value) != 9:
5957
return False
@@ -108,8 +106,6 @@ def es_nif(value: str, /):
108106
If `value` is a valid DOI string.
109107
(ValidationError):
110108
If `value` is an invalid DOI string.
111-
112-
> *New in version 0.13.0*.
113109
"""
114110
number_by_letter = {"L": "0", "M": "0", "K": "0"}
115111
special_cases = {"X0000000T", "00000000T", "00000001R"}
@@ -143,8 +139,6 @@ def es_nie(value: str, /):
143139
If `value` is a valid DOI string.
144140
(ValidationError):
145141
If `value` is an invalid DOI string.
146-
147-
> *New in version 0.13.0*.
148142
"""
149143
number_by_letter = {"X": "0", "Y": "1", "Z": "2"}
150144
# NIE must must start with X Y or Z
@@ -179,7 +173,5 @@ def es_doi(value: str, /):
179173
If `value` is a valid DOI string.
180174
(ValidationError):
181175
If `value` is an invalid DOI string.
182-
183-
> *New in version 0.13.0*.
184176
"""
185177
return es_nie(value) or es_nif(value) or es_cif(value)

src/validators/i18n/fi.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ def fi_business_id(value: str, /):
5555
If `value` is a valid finnish business id.
5656
(ValidationError):
5757
If `value` is an invalid finnish business id.
58-
59-
Note:
60-
- *In version 0.5.0*:
61-
- Function renamed from `finnish_business_id` to `fi_business_id`
62-
63-
> *New in version 0.4.0*.
6458
"""
6559
if not value:
6660
return False
@@ -100,8 +94,6 @@ def fi_ssn(value: str, /, *, allow_temporal_ssn: bool = True):
10094
If `value` is a valid finnish SSN.
10195
(ValidationError):
10296
If `value` is an invalid finnish SSN.
103-
104-
> *New in version 0.5.0*.
10597
"""
10698
if not value:
10799
return False

src/validators/i18n/fr.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def fr_department(value: typing.Union[str, int]):
5353
If `value` is a valid french department number.
5454
(ValidationError):
5555
If `value` is an invalid french department number.
56-
57-
> *New in version 0.23.0*.
5856
"""
5957
if not value:
6058
return False
@@ -96,8 +94,6 @@ def fr_ssn(value: str):
9694
If `value` is a valid french Social Security Number.
9795
(ValidationError):
9896
If `value` is an invalid french Social Security Number.
99-
100-
> *New in version 0.23.0*.
10197
"""
10298
if not value:
10399
return False

src/validators/iban.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def iban(value: str, /):
3838
If `value` is a valid IBAN code.
3939
(ValidationError):
4040
If `value` is an invalid IBAN code.
41-
42-
> *New in version 0.8.0*
4341
"""
4442
return (
4543
(re.match(r"^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$", value) and _mod_check(value))

src/validators/ip_address.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ def ipv4(value: str, /, *, cidr: bool = True, strict: bool = False, host_bit: bo
4949
If `value` is a valid IPv4 address.
5050
(ValidationError):
5151
If `value` is an invalid IPv4 address.
52-
53-
Note:
54-
- *In version 0.14.0*:
55-
- Add supports for CIDR notation
56-
57-
> *New in version 0.2.0*
5852
"""
5953
if not value:
6054
return False
@@ -102,12 +96,6 @@ def ipv6(value: str, /, *, cidr: bool = True, strict: bool = False, host_bit: bo
10296
If `value` is a valid IPv6 address.
10397
(ValidationError):
10498
If `value` is an invalid IPv6 address.
105-
106-
Note:
107-
- *In version 0.14.0*:
108-
- Add supports for CIDR notation
109-
110-
> *New in version 0.2.0*
11199
"""
112100
if not value:
113101
return False

src/validators/mac_address.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,5 @@ def mac_address(value: str, /):
3030
If `value` is a valid MAC address.
3131
(ValidationError):
3232
If `value` is an invalid MAC address.
33-
34-
> *New in version 0.2.0*.
3533
"""
3634
return re.match(r"^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$", value) if value else False

src/validators/slug.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ def slug(value: str, /):
2929
If `value` is a valid slug.
3030
(ValidationError):
3131
If `value` is an invalid slug.
32-
33-
> *New in version 0.6.0*.
3432
"""
3533
return re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value) if value else False

0 commit comments

Comments
 (0)