Skip to content

Commit

Permalink
Revert "internetarchive#10196 Removed redundant # noqa comments"
Browse files Browse the repository at this point in the history
This reverts commit faf6297.
  • Loading branch information
drona-gyawali committed Dec 27, 2024
1 parent faf6297 commit 9426e29
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/coverstore-server
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ start coverstore using gunicorn webserver:
import os
import sys

import _init_path
import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH
import web

web.config.debug = False
Expand Down
2 changes: 1 addition & 1 deletion scripts/i18n-messages
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ macros and write to openlibrary/i18n/messages.pot file.
"""
import sys

import _init_path
import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH

from openlibrary import i18n

Expand Down
2 changes: 1 addition & 1 deletion scripts/infobase-server
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import logging
import os
import sys

import _init_path
import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH
import web

from openlibrary.utils.sentry import Sentry
Expand Down
8 changes: 5 additions & 3 deletions scripts/openlibrary-server
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def setup_env():


def start_server():
import _init_path
import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH

args = sys.argv[1:]

if len(args) < 1 or sys.argv[0] in ['-h', '--help']:
Expand All @@ -55,7 +56,7 @@ def start_server():
def load_infogami(config_file):
import infogami
from infogami import config
from infogami.utils import delegate
from infogami.utils import delegate # noqa: F401 side effects may be needed

config.plugin_path += ['openlibrary.plugins']
config.site = "openlibrary.org"
Expand Down Expand Up @@ -86,7 +87,8 @@ class BaseWSGIServer(Application):
pass

def load(self):
import _init_path
import _init_path # noqa: F401 Imported for side effect of setting PYTHONPATH

load_infogami(self.config_file)

import infogami
Expand Down
3 changes: 1 addition & 2 deletions scripts/upstream-adapter
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

import _init_path

import _init_path # noqa: F401 Imported for its side effect of setting PYTHONPATH

from openlibrary.plugins.upstream import adapter

Expand Down

0 comments on commit 9426e29

Please sign in to comment.