-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better pattern substitution for non alphanumeric characters in f…
…ile names
- Loading branch information
1 parent
596bba3
commit 8b72b32
Showing
5 changed files
with
25 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.9.1-slim | ||
FROM python:3.9.4-slim | ||
|
||
WORKDIR /usr/src/app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import re | ||
from string import ascii_letters, digits | ||
|
||
|
||
def cleanup_job_suffix(input_string): | ||
# keep only word character, removing all non-word chars | ||
job_suffix = re.sub(r"\W", "", input_string.lower(), flags=re.I) | ||
job_suffix = re.sub(r"[à-ú]|[À-Ú]", "", job_suffix, flags=re.I) | ||
job_suffix = job_suffix.replace("_", "") | ||
return job_suffix | ||
# keep only a-z and 0-9 | ||
job_suffix = "".join([ch for ch in input_string if ch in (ascii_letters + digits)]) | ||
return job_suffix.lower() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,20 @@ | ||
attrs==20.3.0 | ||
cachetools==4.2.0 | ||
cachetools==4.2.1 | ||
certifi==2020.12.5 | ||
chardet==3.0.4 | ||
flake8==3.8.4 | ||
google-auth==1.24.0 | ||
chardet==4.0.0 | ||
google-auth==1.28.1 | ||
idna==2.10 | ||
importlib-metadata==3.3.0 | ||
iniconfig==1.1.1 | ||
kubernetes==12.0.1 | ||
mccabe==0.6.1 | ||
more-itertools==8.6.0 | ||
oauthlib==3.1.0 | ||
packaging==20.8 | ||
pluggy==0.13.1 | ||
prometheus-client==0.9.0 | ||
py==1.10.0 | ||
prometheus-client==0.10.1 | ||
pyasn1==0.4.8 | ||
pyasn1-modules==0.2.8 | ||
pycodestyle==2.6.0 | ||
pyflakes==2.2.0 | ||
pyparsing==2.4.7 | ||
pytest==6.2.1 | ||
pygogo==0.13.2 | ||
python-consul==1.1.0 | ||
python-dateutil==2.8.1 | ||
PyYAML==5.3.1 | ||
PyYAML==5.4.1 | ||
requests==2.25.1 | ||
requests-oauthlib==1.3.0 | ||
rsa==4.6 | ||
rsa==4.7.2 | ||
six==1.15.0 | ||
toml==0.10.2 | ||
typing-extensions==3.7.4.3 | ||
urllib3==1.26.2 | ||
wcwidth==0.2.5 | ||
websocket-client==0.57.0 | ||
zipp==3.4.0 | ||
urllib3==1.26.4 | ||
websocket-client==0.58.0 |