File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
22name = " python-usernames"
3- version = " 1.0.0"
43description = " Python library to validate usernames suitable for use in public facing applications."
54authors = [
65 { name = " Saurabh Kumar" , email = " python-usernames@saurabh-kumar.com" }
@@ -61,7 +60,11 @@ dev-dependencies = [
6160 " pytest~=7.3.2" ,
6261 " black~=23.3.0" ,
6362 " ruff~=0.0.272" ,
63+ " hatch~=1.7.0" ,
6464]
6565
6666[tool .hatch .metadata ]
6767allow-direct-references = true
68+
69+ [tool .hatch .version ]
70+ path = " src/python_usernames/__about__.py"
Original file line number Diff line number Diff line change 77# all-features: false
88
99-e file:.
10+ anyio==3.7.0
1011black==23.3.0
12+ certifi==2023.5.7
1113click==8.1.3
14+ distlib==0.3.6
15+ editables==0.3
16+ filelock==3.12.2
17+ h11==0.14.0
18+ hatch==1.7.0
19+ hatchling==1.18.0
20+ httpcore==0.17.2
21+ httpx==0.24.1
22+ hyperlink==21.0.0
23+ idna==3.4
24+ importlib-metadata==6.6.0
1225iniconfig==2.0.0
26+ jaraco-classes==3.2.3
27+ keyring==23.13.1
28+ markdown-it-py==3.0.0
29+ mdurl==0.1.2
30+ more-itertools==9.1.0
1331mypy-extensions==1.0.0
1432packaging==23.1
1533pathspec==0.11.1
34+ pexpect==4.8.0
1635platformdirs==3.5.3
1736pluggy==1.0.0
37+ ptyprocess==0.7.0
38+ pygments==2.15.1
39+ pyperclip==1.8.2
1840pytest==7.3.2
41+ rich==13.4.2
1942ruff==0.0.272
43+ shellingham==1.5.0.post1
44+ sniffio==1.3.0
45+ tomli-w==1.0.0
46+ tomlkit==0.11.8
47+ trove-classifiers==2023.5.24
48+ userpath==1.8.0
49+ virtualenv==20.23.1
50+ zipp==3.15.0
Original file line number Diff line number Diff line change 1+ VERSION = "0.4.1"
Original file line number Diff line number Diff line change 11from .validators import is_safe_username
22
3+ __version__ = "0.4.1"
4+
35__all__ = ["is_safe_username" ]
Original file line number Diff line number Diff line change 1515 # Try backported to PY<37 `importlib_resources`.
1616 import importlib_resources as pkg_resources
1717
18+
1819def get_reserved_words ():
19- content = ''
20+ content = ""
2021 # https://stackoverflow.com/questions/6028000/
2122 try :
2223 with (pkg_resources .files ("python_usernames" ) / "words.txt" ).open () as _f :
2324 content = _f .read ()
2425 except AttributeError :
2526 # Python < PY3.9, fall back to method deprecated in PY3.11.
26- content = pkg_resources .read_text ("python_usernames" , ' words.txt' )
27+ content = pkg_resources .read_text ("python_usernames" , " words.txt" )
2728
2829 return set (content .splitlines ())
2930
31+
3032__all__ = ["get_reserved_words" ]
You can’t perform that action at this time.
0 commit comments