From aca34825b12089bf25109487899f9bc6d3e8ee78 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Thu, 15 Feb 2024 22:05:22 -0500 Subject: [PATCH] remove unused imports --- relay/application.py | 3 --- relay/cache.py | 1 - relay/misc.py | 6 ------ relay/views/activitypub.py | 1 - relay/views/api.py | 1 - relay/views/frontend.py | 5 ----- relay/views/misc.py | 1 - setup.cfg | 2 ++ 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/relay/application.py b/relay/application.py index 8fb70df..32577ef 100644 --- a/relay/application.py +++ b/relay/application.py @@ -11,7 +11,6 @@ import typing from aiohttp import web from aputils.signer import Signer from datetime import datetime, timedelta -from gunicorn.app.wsgiapp import WSGIApplication from . import logger as logging from .cache import get_cache @@ -23,9 +22,7 @@ from .views import VIEWS from .views.api import handle_api_path if typing.TYPE_CHECKING: - from collections.abc import Awaitable from tinysql import Database, Row - from typing import Any from .cache import Cache from .misc import Message diff --git a/relay/cache.py b/relay/cache.py index 63f1a8c..faee1e5 100644 --- a/relay/cache.py +++ b/relay/cache.py @@ -15,7 +15,6 @@ from .misc import Message, boolean if typing.TYPE_CHECKING: from typing import Any from collections.abc import Callable, Iterator - from tinysql import Database from .application import Application diff --git a/relay/misc.py b/relay/misc.py index bb78957..d730ccf 100644 --- a/relay/misc.py +++ b/relay/misc.py @@ -10,14 +10,8 @@ from aputils.message import Message as ApMessage from uuid import uuid4 if typing.TYPE_CHECKING: - from collections.abc import Awaitable, Coroutine, Generator - from tinysql import Connection from typing import Any from .application import Application - from .cache import Cache - from .config import Config - from .database import Database - from .http_client import HttpClient IS_DOCKER = bool(os.environ.get('DOCKER_RUNNING')) diff --git a/relay/views/activitypub.py b/relay/views/activitypub.py index 70f759a..e95f02e 100644 --- a/relay/views/activitypub.py +++ b/relay/views/activitypub.py @@ -17,7 +17,6 @@ if typing.TYPE_CHECKING: from aiohttp.web import Request from aputils.signer import Signer from tinysql import Row - from ..database.connection import Connection # pylint: disable=unused-argument diff --git a/relay/views/api.py b/relay/views/api.py index ade1d3b..d792068 100644 --- a/relay/views/api.py +++ b/relay/views/api.py @@ -17,7 +17,6 @@ from ..misc import Message, Response if typing.TYPE_CHECKING: from aiohttp.web import Request from collections.abc import Coroutine - from ..database.connection import Connection CONFIG_IGNORE = ( diff --git a/relay/views/frontend.py b/relay/views/frontend.py index 663edd4..00af6fb 100644 --- a/relay/views/frontend.py +++ b/relay/views/frontend.py @@ -4,15 +4,10 @@ import typing from .base import View, register_route -from .. import __version__ from ..misc import Response if typing.TYPE_CHECKING: from aiohttp.web import Request - from aputils.signer import Signer - from collections.abc import Callable - from tinysql import Row - from ..database.connection import Connection HOME_TEMPLATE = """ diff --git a/relay/views/misc.py b/relay/views/misc.py index 7c2e65c..3a84436 100644 --- a/relay/views/misc.py +++ b/relay/views/misc.py @@ -13,7 +13,6 @@ from ..misc import Response if typing.TYPE_CHECKING: from aiohttp.web import Request - from ..database.connection import Connection VERSION = __version__ diff --git a/setup.cfg b/setup.cfg index 933b81c..aa706fd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,3 +42,5 @@ console_scripts = [flake8] select = F401 +per-file-ignores = + relay/views/__init__.py: F401