1
0
Fork 0
mirror of synced 2024-06-14 16:24:45 +12:00

Fix typing on function

This commit is contained in:
Serene-Arc 2021-04-13 13:17:40 +10:00 committed by Ali Parlakci
parent 4b195f2b53
commit e672e28a12

View file

@ -63,7 +63,7 @@ class Resource:
def create_hash(self):
self.hash = hashlib.md5(self.content)
def _determine_extension(self) -> str:
def _determine_extension(self) -> Optional[str]:
extension_pattern = re.compile(r'.*(\..{3,5})(?:\?.*)?$')
match = re.search(extension_pattern, self.url)
if match: