Consolidate flake8 settings

Consolidates sane flake8 settings to pyproject with the Flake8-pyproject plugin.

Does not change logic of test workflow but allows base settings to live in pyproject for anyone using flake8 as an external linter (e.g. vscode)

Also fixes some flake8 errors that were not being picked up by current testing, mostly unused imports.
This commit is contained in:
OMEGARAZER
2022-12-28 10:00:43 -05:00
parent 0bb94040d6
commit 2bafb1b99b
7 changed files with 24 additions and 13 deletions

View File

@@ -67,7 +67,7 @@ class Imgur(BaseDownloader):
image_dict = re.search(outer_regex, chosen_script).group(1)
image_dict = re.search(inner_regex, image_dict).group(1)
except AttributeError:
raise SiteDownloaderError(f"Could not find image dictionary in page source")
raise SiteDownloaderError("Could not find image dictionary in page source")
try:
image_dict = json.loads(image_dict)

View File

@@ -2,14 +2,11 @@
# -*- coding: utf-8 -*-
import logging
import tempfile
from pathlib import Path
from typing import Callable, Optional
from typing import Optional
import yt_dlp
from praw.models import Submission
from bdfr.exceptions import NotADownloadableLinkError, SiteDownloaderError
from bdfr.exceptions import NotADownloadableLinkError
from bdfr.resource import Resource
from bdfr.site_authenticator import SiteAuthenticator
from bdfr.site_downloaders.youtube import Youtube