diff options
| author | Cody Logan <clpo13@gmail.com> | 2021-12-07 15:30:56 -0800 |
|---|---|---|
| committer | Cody Logan <clpo13@gmail.com> | 2021-12-07 15:30:56 -0800 |
| commit | bb0bf8f0c79c31114a615cb201505de3fae15044 (patch) | |
| tree | bd60957b430f4a411b988dad2d3ed53b07b7e8b3 /wikiget/validations.py | |
| parent | 3e57a1902f7bf6884662fb2aca403e13787c2d26 (diff) | |
| download | wikiget-bb0bf8f0c79c31114a615cb201505de3fae15044.tar.gz wikiget-bb0bf8f0c79c31114a615cb201505de3fae15044.zip | |
Standardize on double quotes
Diffstat (limited to 'wikiget/validations.py')
| -rw-r--r-- | wikiget/validations.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wikiget/validations.py b/wikiget/validations.py index 20ef74f..bd99570 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) |
