Add tentative typing

This commit is contained in:
Serene-Arc
2021-02-06 22:29:13 +10:00
committed by Ali Parlakci
parent 4143b86467
commit 185335e60b
20 changed files with 84 additions and 69 deletions

View File

@@ -1,11 +1,12 @@
import os
import pathlib
from src.downloaders.downloaderUtils import getExtension, getFile
from src.utils import GLOBAL
class Direct:
def __init__(self, directory, post):
def __init__(self, directory: pathlib.Path, post: dict):
post['EXTENSION'] = getExtension(post['CONTENTURL'])
if not os.path.exists(directory):
os.makedirs(directory)