aboutsummaryrefslogtreecommitdiff
path: root/wikiget/validations.py
diff options
context:
space:
mode:
authorCody Logan <clpo13@gmail.com>2023-09-26 10:45:58 -0700
committerCody Logan <clpo13@gmail.com>2023-09-26 10:47:09 -0700
commita310af0aa10f8b5a370c16ac3a7dcdd12e13f729 (patch)
tree9542c9cb03dcd2c2b496377eb7367ec1c24eff08 /wikiget/validations.py
parent0dc790c513ac39180f78f5a7e6713908410c3abe (diff)
downloadwikiget-a310af0aa10f8b5a370c16ac3a7dcdd12e13f729.tar.gz
wikiget-a310af0aa10f8b5a370c16ac3a7dcdd12e13f729.zip
Style fixups with Black
Diffstat (limited to 'wikiget/validations.py')
-rw-r--r--wikiget/validations.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wikiget/validations.py b/wikiget/validations.py
index 5e7213f..c0aa90d 100644
--- a/wikiget/validations.py
+++ b/wikiget/validations.py
@@ -31,7 +31,7 @@ def valid_file(search_string):
"""
# second group could also restrict to file extensions with three or more
# letters with ([^/\r\n\t\f\v]+\.\w{3,})
- file_regex = re.compile(r'(File:|Image:)([^/\r\n\t\f\v]+\.\w+)$', re.I)
+ file_regex = re.compile(r"(File:|Image:)([^/\r\n\t\f\v]+\.\w+)$", re.I)
return file_regex.search(search_string)
@@ -44,7 +44,7 @@ def valid_site(search_string):
:param search_string: string to validate
:returns: a regex Match object if there's a match or None otherwise
"""
- site_regex = re.compile(r'wiki[mp]edia\.org$', re.I)
+ site_regex = re.compile(r"wiki[mp]edia\.org$", re.I)
return site_regex.search(search_string)
@@ -56,7 +56,7 @@ def verify_hash(filename):
:return: hash digest
"""
hasher = hashlib.sha1()
- with open(filename, 'rb') as dl:
+ with open(filename, "rb") as dl:
buf = dl.read(BLOCKSIZE)
while len(buf) > 0:
hasher.update(buf)