From 371492c7e8c6a89f9f948ab8d64f73efa11d887c Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Tue, 22 Oct 2024 16:32:24 -0300 Subject: [PATCH] Run autoflake without ignore-init-module-imports (#2125) --- .pre-commit-config.yaml | 1 - src/palace/manager/api/sip/__init__.py | 7 ++----- src/palace/manager/sqlalchemy/model/__init__.py | 1 + src/palace/manager/util/__init__.py | 4 +--- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09ea00a3c1..304a3c440c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,6 @@ repos: args: - --in-place - --remove-all-unused-imports - - --ignore-init-module-imports - repo: https://github.com/psf/black rev: 24.8.0 diff --git a/src/palace/manager/api/sip/__init__.py b/src/palace/manager/api/sip/__init__.py index 554c5629cf..a0f17d08da 100644 --- a/src/palace/manager/api/sip/__init__.py +++ b/src/palace/manager/api/sip/__init__.py @@ -13,10 +13,7 @@ BasicAuthProviderLibrarySettings, BasicAuthProviderSettings, ) -from palace.manager.api.problem_details import ( - INVALID_CREDENTIALS, - PATRON_OF_ANOTHER_LIBRARY, -) +from palace.manager.api.problem_details import INVALID_CREDENTIALS from palace.manager.api.sip.client import Sip2Encoding, SIPClient from palace.manager.api.sip.dialect import Dialect as Sip2Dialect from palace.manager.integration.settings import ( @@ -27,7 +24,7 @@ from palace.manager.service.analytics.analytics import Analytics from palace.manager.sqlalchemy.model.patron import Patron from palace.manager.util import MoneyUtility -from palace.manager.util.problem_detail import ProblemDetail, ProblemDetailException +from palace.manager.util.problem_detail import ProblemDetail class SIP2Settings(BasicAuthProviderSettings): diff --git a/src/palace/manager/sqlalchemy/model/__init__.py b/src/palace/manager/sqlalchemy/model/__init__.py index 64bcb3b90a..1e44bfc591 100644 --- a/src/palace/manager/sqlalchemy/model/__init__.py +++ b/src/palace/manager/sqlalchemy/model/__init__.py @@ -1,3 +1,4 @@ +# autoflake: skip_file """ We rely on all of our sqlalchemy models being listed here, so that we can make sure they are all registered with the declarative base. diff --git a/src/palace/manager/util/__init__.py b/src/palace/manager/util/__init__.py index 88528af810..d9d34c0b14 100644 --- a/src/palace/manager/util/__init__.py +++ b/src/palace/manager/util/__init__.py @@ -6,12 +6,10 @@ import string from collections import Counter from collections.abc import Generator, Iterable, Sequence -from typing import Any, SupportsIndex, TypeVar +from typing import Any, TypeVar import sqlalchemy from money import Money -from sqlalchemy import distinct, select -from sqlalchemy.sql.functions import func import palace.manager.sqlalchemy.flask_sqlalchemy_session