pep585 and pathlib updates
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
import re
|
||||
import urllib.parse
|
||||
from typing import Type
|
||||
|
||||
from bdfr.exceptions import NotADownloadableLinkError
|
||||
from bdfr.site_downloaders.base_downloader import BaseDownloader
|
||||
@@ -24,7 +23,7 @@ from bdfr.site_downloaders.youtube import Youtube
|
||||
|
||||
class DownloadFactory:
|
||||
@staticmethod
|
||||
def pull_lever(url: str) -> Type[BaseDownloader]:
|
||||
def pull_lever(url: str) -> type[BaseDownloader]:
|
||||
sanitised_url = DownloadFactory.sanitise_url(url)
|
||||
if re.match(r"(i\.|m\.)?imgur", sanitised_url):
|
||||
return Imgur
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
import logging
|
||||
import re
|
||||
from typing import Callable, Optional
|
||||
from collections.abc import Callable
|
||||
from typing import Optional
|
||||
|
||||
import bs4
|
||||
from praw.models import Submission
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
import logging
|
||||
import tempfile
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
from typing import Callable, Optional
|
||||
from typing import Optional
|
||||
|
||||
import yt_dlp
|
||||
from praw.models import Submission
|
||||
|
||||
Reference in New Issue
Block a user