From faf629786d9ef7443969fd4237caeeeba224fed3 Mon Sep 17 00:00:00 2001 From: Dorna Raj Gyawali Date: Wed, 25 Dec 2024 13:04:18 +0545 Subject: [PATCH] #10196 Removed redundant # noqa comments --- scripts/coverstore-server | 2 +- scripts/i18n-messages | 2 +- scripts/infobase-server | 2 +- scripts/openlibrary-server | 8 +++----- scripts/upstream-adapter | 3 ++- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/coverstore-server b/scripts/coverstore-server index aee530a89e3..318954adc8b 100755 --- a/scripts/coverstore-server +++ b/scripts/coverstore-server @@ -20,7 +20,7 @@ start coverstore using gunicorn webserver: import os import sys -import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH +import _init_path import web web.config.debug = False diff --git a/scripts/i18n-messages b/scripts/i18n-messages index c65e3808f5c..895caee3899 100755 --- a/scripts/i18n-messages +++ b/scripts/i18n-messages @@ -4,7 +4,7 @@ macros and write to openlibrary/i18n/messages.pot file. """ import sys -import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH +import _init_path from openlibrary import i18n diff --git a/scripts/infobase-server b/scripts/infobase-server index 7a28f109ee6..a9d6422f261 100755 --- a/scripts/infobase-server +++ b/scripts/infobase-server @@ -16,7 +16,7 @@ import logging import os import sys -import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH +import _init_path import web from openlibrary.utils.sentry import Sentry diff --git a/scripts/openlibrary-server b/scripts/openlibrary-server index 8e485927b04..6e16d90e7fc 100755 --- a/scripts/openlibrary-server +++ b/scripts/openlibrary-server @@ -34,8 +34,7 @@ def setup_env(): def start_server(): - import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH - + import _init_path args = sys.argv[1:] if len(args) < 1 or sys.argv[0] in ['-h', '--help']: @@ -56,7 +55,7 @@ def start_server(): def load_infogami(config_file): import infogami from infogami import config - from infogami.utils import delegate # noqa: F401 side effects may be needed + from infogami.utils import delegate config.plugin_path += ['openlibrary.plugins'] config.site = "openlibrary.org" @@ -87,8 +86,7 @@ class BaseWSGIServer(Application): pass def load(self): - import _init_path # noqa: F401 Imported for side effect of setting PYTHONPATH - + import _init_path load_infogami(self.config_file) import infogami diff --git a/scripts/upstream-adapter b/scripts/upstream-adapter index 5ff96c42ab2..6301c21ef3d 100755 --- a/scripts/upstream-adapter +++ b/scripts/upstream-adapter @@ -1,6 +1,7 @@ #!/usr/bin/env python -import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH +import _init_path + from openlibrary.plugins.upstream import adapter