From 83f45e7f60e7fd6ff5d1156af0ebf28904515ac8 Mon Sep 17 00:00:00 2001 From: OMEGARAZER <869111+OMEGARAZER@users.noreply.github.com> Date: Mon, 19 Dec 2022 18:32:37 -0500 Subject: [PATCH] Standardize shebang and coding declaration Standardizes shebang and coding declarations. Coding matches what's used by install tools such as pip(x). Removes a few init files that were not needed. --- bdfr/__init__.py | 3 +++ bdfr/__main__.py | 1 + bdfr/archive_entry/__init__.py | 2 -- bdfr/archive_entry/base_archive_entry.py | 2 +- bdfr/archive_entry/comment_archive_entry.py | 2 +- bdfr/archive_entry/submission_archive_entry.py | 2 +- bdfr/archiver.py | 2 +- bdfr/cloner.py | 2 +- bdfr/completion.py | 2 +- bdfr/configuration.py | 2 +- bdfr/connector.py | 2 +- bdfr/download_filter.py | 2 +- bdfr/downloader.py | 2 +- bdfr/exceptions.py | 3 ++- bdfr/file_name_formatter.py | 3 ++- bdfr/oauth2.py | 2 +- bdfr/resource.py | 2 +- bdfr/site_authenticator.py | 2 +- bdfr/site_downloaders/__init__.py | 0 bdfr/site_downloaders/base_downloader.py | 2 +- bdfr/site_downloaders/delay_for_reddit.py | 1 + bdfr/site_downloaders/direct.py | 1 + bdfr/site_downloaders/download_factory.py | 2 +- bdfr/site_downloaders/erome.py | 1 + bdfr/site_downloaders/fallback_downloaders/__init__.py | 0 .../fallback_downloaders/fallback_downloader.py | 2 +- bdfr/site_downloaders/fallback_downloaders/ytdlp_fallback.py | 2 +- bdfr/site_downloaders/gallery.py | 1 + bdfr/site_downloaders/gfycat.py | 1 + bdfr/site_downloaders/imgur.py | 1 + bdfr/site_downloaders/pornhub.py | 2 +- bdfr/site_downloaders/redgifs.py | 1 + bdfr/site_downloaders/self_post.py | 1 + bdfr/site_downloaders/vidble.py | 3 ++- bdfr/site_downloaders/vreddit.py | 1 + bdfr/site_downloaders/youtube.py | 1 + tests/__init__.py | 0 tests/archive_entry/__init__.py | 2 -- tests/archive_entry/test_comment_archive_entry.py | 2 +- tests/archive_entry/test_submission_archive_entry.py | 2 +- tests/conftest.py | 2 +- tests/integration_tests/__init__.py | 2 -- tests/integration_tests/test_archive_integration.py | 2 +- tests/integration_tests/test_clone_integration.py | 2 +- tests/integration_tests/test_download_integration.py | 2 +- tests/site_downloaders/__init__.py | 0 tests/site_downloaders/fallback_downloaders/__init__.py | 0 .../fallback_downloaders/test_ytdlp_fallback.py | 1 + tests/site_downloaders/test_delay_for_reddit.py | 2 +- tests/site_downloaders/test_direct.py | 2 +- tests/site_downloaders/test_download_factory.py | 2 +- tests/site_downloaders/test_erome.py | 3 ++- tests/site_downloaders/test_gallery.py | 2 +- tests/site_downloaders/test_gfycat.py | 2 +- tests/site_downloaders/test_imgur.py | 2 +- tests/site_downloaders/test_pornhub.py | 2 +- tests/site_downloaders/test_redgifs.py | 2 +- tests/site_downloaders/test_self_post.py | 2 +- tests/site_downloaders/test_vidble.py | 3 ++- tests/site_downloaders/test_vreddit.py | 2 +- tests/site_downloaders/test_youtube.py | 2 +- tests/test_archiver.py | 2 +- tests/test_configuration.py | 2 +- tests/test_connector.py | 3 ++- tests/test_download_filter.py | 2 +- tests/test_downloader.py | 2 +- tests/test_file_name_formatter.py | 4 ++-- tests/test_oauth2.py | 2 +- tests/test_resource.py | 2 +- 69 files changed, 70 insertions(+), 55 deletions(-) delete mode 100644 bdfr/archive_entry/__init__.py delete mode 100644 bdfr/site_downloaders/__init__.py delete mode 100644 bdfr/site_downloaders/fallback_downloaders/__init__.py delete mode 100644 tests/__init__.py delete mode 100644 tests/archive_entry/__init__.py delete mode 100644 tests/integration_tests/__init__.py delete mode 100644 tests/site_downloaders/__init__.py delete mode 100644 tests/site_downloaders/fallback_downloaders/__init__.py diff --git a/bdfr/__init__.py b/bdfr/__init__.py index b482efe..6bcee53 100644 --- a/bdfr/__init__.py +++ b/bdfr/__init__.py @@ -1 +1,4 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + __version__ = "2.6.2" diff --git a/bdfr/__main__.py b/bdfr/__main__.py index 57373c9..e35ba0a 100644 --- a/bdfr/__main__.py +++ b/bdfr/__main__.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging import sys diff --git a/bdfr/archive_entry/__init__.py b/bdfr/archive_entry/__init__.py deleted file mode 100644 index d4c1799..0000000 --- a/bdfr/archive_entry/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env python3 -# coding=utf-8 diff --git a/bdfr/archive_entry/base_archive_entry.py b/bdfr/archive_entry/base_archive_entry.py index 49ea58a..3dea5e4 100644 --- a/bdfr/archive_entry/base_archive_entry.py +++ b/bdfr/archive_entry/base_archive_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from abc import ABC, abstractmethod from typing import Union diff --git a/bdfr/archive_entry/comment_archive_entry.py b/bdfr/archive_entry/comment_archive_entry.py index 1c72811..cc59373 100644 --- a/bdfr/archive_entry/comment_archive_entry.py +++ b/bdfr/archive_entry/comment_archive_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging diff --git a/bdfr/archive_entry/submission_archive_entry.py b/bdfr/archive_entry/submission_archive_entry.py index 92f326e..38f1d34 100644 --- a/bdfr/archive_entry/submission_archive_entry.py +++ b/bdfr/archive_entry/submission_archive_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging diff --git a/bdfr/archiver.py b/bdfr/archiver.py index e2ed33d..be5a445 100644 --- a/bdfr/archiver.py +++ b/bdfr/archiver.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import json import logging diff --git a/bdfr/cloner.py b/bdfr/cloner.py index e82cfaa..53108c0 100644 --- a/bdfr/cloner.py +++ b/bdfr/cloner.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging from time import sleep diff --git a/bdfr/completion.py b/bdfr/completion.py index 43a9743..9c7d6b2 100644 --- a/bdfr/completion.py +++ b/bdfr/completion.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import os import subprocess diff --git a/bdfr/configuration.py b/bdfr/configuration.py index a2a5310..0d00192 100644 --- a/bdfr/configuration.py +++ b/bdfr/configuration.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging from argparse import Namespace diff --git a/bdfr/connector.py b/bdfr/connector.py index e5d74a2..bf50f32 100644 --- a/bdfr/connector.py +++ b/bdfr/connector.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import configparser import importlib.resources diff --git a/bdfr/download_filter.py b/bdfr/download_filter.py index 9019cc9..0def316 100644 --- a/bdfr/download_filter.py +++ b/bdfr/download_filter.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging import re diff --git a/bdfr/downloader.py b/bdfr/downloader.py index 1cb6d46..7ad8a6b 100644 --- a/bdfr/downloader.py +++ b/bdfr/downloader.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import hashlib import logging.handlers diff --git a/bdfr/exceptions.py b/bdfr/exceptions.py index 1757cd9..e7e4415 100644 --- a/bdfr/exceptions.py +++ b/bdfr/exceptions.py @@ -1,4 +1,5 @@ -#!/usr/bin/env +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- class BulkDownloaderException(Exception): diff --git a/bdfr/file_name_formatter.py b/bdfr/file_name_formatter.py index 684c626..9ee481d 100644 --- a/bdfr/file_name_formatter.py +++ b/bdfr/file_name_formatter.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- + import datetime import logging import platform diff --git a/bdfr/oauth2.py b/bdfr/oauth2.py index 60f2169..28b956a 100644 --- a/bdfr/oauth2.py +++ b/bdfr/oauth2.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import configparser import logging diff --git a/bdfr/resource.py b/bdfr/resource.py index 0f5404c..bd3ae88 100644 --- a/bdfr/resource.py +++ b/bdfr/resource.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import hashlib import logging diff --git a/bdfr/site_authenticator.py b/bdfr/site_authenticator.py index bbf3b46..08b98e0 100644 --- a/bdfr/site_authenticator.py +++ b/bdfr/site_authenticator.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import configparser diff --git a/bdfr/site_downloaders/__init__.py b/bdfr/site_downloaders/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bdfr/site_downloaders/base_downloader.py b/bdfr/site_downloaders/base_downloader.py index f3ecec5..e4ac111 100644 --- a/bdfr/site_downloaders/base_downloader.py +++ b/bdfr/site_downloaders/base_downloader.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging from abc import ABC, abstractmethod diff --git a/bdfr/site_downloaders/delay_for_reddit.py b/bdfr/site_downloaders/delay_for_reddit.py index 3380731..40a7f9b 100644 --- a/bdfr/site_downloaders/delay_for_reddit.py +++ b/bdfr/site_downloaders/delay_for_reddit.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging from typing import Optional diff --git a/bdfr/site_downloaders/direct.py b/bdfr/site_downloaders/direct.py index 4a6ac92..061ad7f 100644 --- a/bdfr/site_downloaders/direct.py +++ b/bdfr/site_downloaders/direct.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- from typing import Optional diff --git a/bdfr/site_downloaders/download_factory.py b/bdfr/site_downloaders/download_factory.py index 638316f..d44be21 100644 --- a/bdfr/site_downloaders/download_factory.py +++ b/bdfr/site_downloaders/download_factory.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import re import urllib.parse diff --git a/bdfr/site_downloaders/erome.py b/bdfr/site_downloaders/erome.py index 26469bc..bf139d2 100644 --- a/bdfr/site_downloaders/erome.py +++ b/bdfr/site_downloaders/erome.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging import re diff --git a/bdfr/site_downloaders/fallback_downloaders/__init__.py b/bdfr/site_downloaders/fallback_downloaders/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/bdfr/site_downloaders/fallback_downloaders/fallback_downloader.py b/bdfr/site_downloaders/fallback_downloaders/fallback_downloader.py index 3bc615d..124724a 100644 --- a/bdfr/site_downloaders/fallback_downloaders/fallback_downloader.py +++ b/bdfr/site_downloaders/fallback_downloaders/fallback_downloader.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from abc import ABC, abstractmethod diff --git a/bdfr/site_downloaders/fallback_downloaders/ytdlp_fallback.py b/bdfr/site_downloaders/fallback_downloaders/ytdlp_fallback.py index 900c8e9..41f8474 100644 --- a/bdfr/site_downloaders/fallback_downloaders/ytdlp_fallback.py +++ b/bdfr/site_downloaders/fallback_downloaders/ytdlp_fallback.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging from typing import Optional diff --git a/bdfr/site_downloaders/gallery.py b/bdfr/site_downloaders/gallery.py index 278932f..6f00410 100644 --- a/bdfr/site_downloaders/gallery.py +++ b/bdfr/site_downloaders/gallery.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging from typing import Optional diff --git a/bdfr/site_downloaders/gfycat.py b/bdfr/site_downloaders/gfycat.py index 7862d33..d7c60ca 100644 --- a/bdfr/site_downloaders/gfycat.py +++ b/bdfr/site_downloaders/gfycat.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import json import re diff --git a/bdfr/site_downloaders/imgur.py b/bdfr/site_downloaders/imgur.py index 0b9ecdd..a4c378f 100644 --- a/bdfr/site_downloaders/imgur.py +++ b/bdfr/site_downloaders/imgur.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import json import re diff --git a/bdfr/site_downloaders/pornhub.py b/bdfr/site_downloaders/pornhub.py index db37720..8ce4492 100644 --- a/bdfr/site_downloaders/pornhub.py +++ b/bdfr/site_downloaders/pornhub.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import logging from typing import Optional diff --git a/bdfr/site_downloaders/redgifs.py b/bdfr/site_downloaders/redgifs.py index 625cf7d..3144c22 100644 --- a/bdfr/site_downloaders/redgifs.py +++ b/bdfr/site_downloaders/redgifs.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import json import re diff --git a/bdfr/site_downloaders/self_post.py b/bdfr/site_downloaders/self_post.py index 1b76b92..5719e59 100644 --- a/bdfr/site_downloaders/self_post.py +++ b/bdfr/site_downloaders/self_post.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging from typing import Optional diff --git a/bdfr/site_downloaders/vidble.py b/bdfr/site_downloaders/vidble.py index a79ee25..aa1e949 100644 --- a/bdfr/site_downloaders/vidble.py +++ b/bdfr/site_downloaders/vidble.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- + import itertools import logging import re diff --git a/bdfr/site_downloaders/vreddit.py b/bdfr/site_downloaders/vreddit.py index a71d350..8f6022e 100644 --- a/bdfr/site_downloaders/vreddit.py +++ b/bdfr/site_downloaders/vreddit.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging import tempfile diff --git a/bdfr/site_downloaders/youtube.py b/bdfr/site_downloaders/youtube.py index f4f8622..f0c0677 100644 --- a/bdfr/site_downloaders/youtube.py +++ b/bdfr/site_downloaders/youtube.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- import logging import tempfile diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/archive_entry/__init__.py b/tests/archive_entry/__init__.py deleted file mode 100644 index d4c1799..0000000 --- a/tests/archive_entry/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env python3 -# coding=utf-8 diff --git a/tests/archive_entry/test_comment_archive_entry.py b/tests/archive_entry/test_comment_archive_entry.py index 8e6f224..1895a89 100644 --- a/tests/archive_entry/test_comment_archive_entry.py +++ b/tests/archive_entry/test_comment_archive_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import praw import pytest diff --git a/tests/archive_entry/test_submission_archive_entry.py b/tests/archive_entry/test_submission_archive_entry.py index 666eec3..8b83f1d 100644 --- a/tests/archive_entry/test_submission_archive_entry.py +++ b/tests/archive_entry/test_submission_archive_entry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import praw import pytest diff --git a/tests/conftest.py b/tests/conftest.py index 3f871a3..77a26fb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import configparser import socket diff --git a/tests/integration_tests/__init__.py b/tests/integration_tests/__init__.py deleted file mode 100644 index d4c1799..0000000 --- a/tests/integration_tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env python3 -# coding=utf-8 diff --git a/tests/integration_tests/test_archive_integration.py b/tests/integration_tests/test_archive_integration.py index c5ad9fb..42689a8 100644 --- a/tests/integration_tests/test_archive_integration.py +++ b/tests/integration_tests/test_archive_integration.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import re import shutil diff --git a/tests/integration_tests/test_clone_integration.py b/tests/integration_tests/test_clone_integration.py index cba4102..60e4012 100644 --- a/tests/integration_tests/test_clone_integration.py +++ b/tests/integration_tests/test_clone_integration.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import shutil from pathlib import Path diff --git a/tests/integration_tests/test_download_integration.py b/tests/integration_tests/test_download_integration.py index 287e8d4..138ea61 100644 --- a/tests/integration_tests/test_download_integration.py +++ b/tests/integration_tests/test_download_integration.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import shutil from pathlib import Path diff --git a/tests/site_downloaders/__init__.py b/tests/site_downloaders/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/site_downloaders/fallback_downloaders/__init__.py b/tests/site_downloaders/fallback_downloaders/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py b/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py index 9823d08..b735539 100644 --- a/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py +++ b/tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/site_downloaders/test_delay_for_reddit.py b/tests/site_downloaders/test_delay_for_reddit.py index 65d080c..045c022 100644 --- a/tests/site_downloaders/test_delay_for_reddit.py +++ b/tests/site_downloaders/test_delay_for_reddit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import Mock diff --git a/tests/site_downloaders/test_direct.py b/tests/site_downloaders/test_direct.py index b652d9a..14190ee 100644 --- a/tests/site_downloaders/test_direct.py +++ b/tests/site_downloaders/test_direct.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import Mock diff --git a/tests/site_downloaders/test_download_factory.py b/tests/site_downloaders/test_download_factory.py index 581656d..2dc3a06 100644 --- a/tests/site_downloaders/test_download_factory.py +++ b/tests/site_downloaders/test_download_factory.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import praw import pytest diff --git a/tests/site_downloaders/test_erome.py b/tests/site_downloaders/test_erome.py index 1baeb66..ce32e88 100644 --- a/tests/site_downloaders/test_erome.py +++ b/tests/site_downloaders/test_erome.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- + import re from unittest.mock import MagicMock diff --git a/tests/site_downloaders/test_gallery.py b/tests/site_downloaders/test_gallery.py index 57d055b..c3cc86f 100644 --- a/tests/site_downloaders/test_gallery.py +++ b/tests/site_downloaders/test_gallery.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import praw import pytest diff --git a/tests/site_downloaders/test_gfycat.py b/tests/site_downloaders/test_gfycat.py index d436636..0cfb36f 100644 --- a/tests/site_downloaders/test_gfycat.py +++ b/tests/site_downloaders/test_gfycat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import Mock diff --git a/tests/site_downloaders/test_imgur.py b/tests/site_downloaders/test_imgur.py index 6b49cd5..7f587c9 100644 --- a/tests/site_downloaders/test_imgur.py +++ b/tests/site_downloaders/test_imgur.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import Mock diff --git a/tests/site_downloaders/test_pornhub.py b/tests/site_downloaders/test_pornhub.py index 42ca5a0..d9971cb 100644 --- a/tests/site_downloaders/test_pornhub.py +++ b/tests/site_downloaders/test_pornhub.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/site_downloaders/test_redgifs.py b/tests/site_downloaders/test_redgifs.py index 0e1a497..6f5ce50 100644 --- a/tests/site_downloaders/test_redgifs.py +++ b/tests/site_downloaders/test_redgifs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import re from unittest.mock import Mock diff --git a/tests/site_downloaders/test_self_post.py b/tests/site_downloaders/test_self_post.py index 104fb3b..9574b3c 100644 --- a/tests/site_downloaders/test_self_post.py +++ b/tests/site_downloaders/test_self_post.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import praw import pytest diff --git a/tests/site_downloaders/test_vidble.py b/tests/site_downloaders/test_vidble.py index 16b5a3b..41398e7 100644 --- a/tests/site_downloaders/test_vidble.py +++ b/tests/site_downloaders/test_vidble.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- + from unittest.mock import Mock import pytest diff --git a/tests/site_downloaders/test_vreddit.py b/tests/site_downloaders/test_vreddit.py index 6e79ba0..d5cc121 100644 --- a/tests/site_downloaders/test_vreddit.py +++ b/tests/site_downloaders/test_vreddit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/site_downloaders/test_youtube.py b/tests/site_downloaders/test_youtube.py index 7a45a3c..3100215 100644 --- a/tests/site_downloaders/test_youtube.py +++ b/tests/site_downloaders/test_youtube.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/test_archiver.py b/tests/test_archiver.py index 932a2ab..cdd12d0 100644 --- a/tests/test_archiver.py +++ b/tests/test_archiver.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from pathlib import Path from unittest.mock import MagicMock diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 652c401..e7999b3 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/test_connector.py b/tests/test_connector.py index 01b6a92..9681e4b 100644 --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- + from datetime import datetime, timedelta from pathlib import Path from typing import Iterator diff --git a/tests/test_download_filter.py b/tests/test_download_filter.py index 07b7d67..3b4d6b8 100644 --- a/tests/test_download_filter.py +++ b/tests/test_download_filter.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock diff --git a/tests/test_downloader.py b/tests/test_downloader.py index ba81b80..d7aa8dd 100644 --- a/tests/test_downloader.py +++ b/tests/test_downloader.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import os import re diff --git a/tests/test_file_name_formatter.py b/tests/test_file_name_formatter.py index c04e07d..4964b3b 100644 --- a/tests/test_file_name_formatter.py +++ b/tests/test_file_name_formatter.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import platform import sys @@ -46,7 +46,7 @@ def do_test_path_equality(result: Path, expected: str) -> bool: expected = Path(*expected) else: expected = Path(expected) - return str(result).endswith(str(expected)) + return str(result).endswith(str(expected)) # noqa: FURB123 @pytest.fixture(scope="session") diff --git a/tests/test_oauth2.py b/tests/test_oauth2.py index 3014c37..123f750 100644 --- a/tests/test_oauth2.py +++ b/tests/test_oauth2.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- import configparser from pathlib import Path diff --git a/tests/test_resource.py b/tests/test_resource.py index 146d9a0..e17d16a 100644 --- a/tests/test_resource.py +++ b/tests/test_resource.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# coding=utf-8 +# -*- coding: utf-8 -*- from unittest.mock import MagicMock