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