From 5b83c682e47e901fa777d61668671bcce7d5bf11 Mon Sep 17 00:00:00 2001 From: Yu Ming Zhu Date: Dec 12 2019 11:00:58 +0000 Subject: remove unused imports --- diff --git a/cli/koji b/cli/koji index 9783f50..fb9e105 100755 --- a/cli/koji +++ b/cli/koji @@ -39,7 +39,7 @@ import six.moves.xmlrpc_client import koji import koji.plugin import koji.util -from koji_cli.commands import * +from koji_cli.commands import * # noqa: F401, F403 from koji_cli.lib import _, categories, get_epilog_str, greetings, warn diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 13056c5..a7238de 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -26,9 +26,9 @@ from koji.util import base64encode, to_list from koji_cli.lib import (_, _list_tasks, _progress_callback, _running_in_bg, activate_session, arg_filter, download_file, error, format_inheritance_flags, greetings, linked_upload, - list_task_output_all_volumes, parse_arches, - print_task_headers, print_task_recurse, unique_path, - warn, watch_logs, watch_tasks) + list_task_output_all_volumes, print_task_headers, + print_task_recurse, unique_path, warn, watch_logs, + watch_tasks) try: import libcomps diff --git a/koji/__init__.py b/koji/__init__.py index 6808162..d0f9a6c 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -37,7 +37,6 @@ import os.path import pwd import random import re -import shutil import signal import socket import struct diff --git a/koji/tasks.py b/koji/tasks.py index 1fea289..12edc70 100644 --- a/koji/tasks.py +++ b/koji/tasks.py @@ -25,7 +25,6 @@ import logging import os import pprint import random -import shutil import signal import time diff --git a/vm/kojikamid.py b/vm/kojikamid.py index 4058caf..f4f26ae 100755 --- a/vm/kojikamid.py +++ b/vm/kojikamid.py @@ -47,7 +47,7 @@ import six import six.moves.xmlrpc_client # urllib is required by the SCM class which is substituted into this file # do not remove the import below -from six.moves import urllib +from six.moves import urllib # noqa: F401 from six.moves.configparser import ConfigParser, SafeConfigParser MANAGER_PORT = 7000 diff --git a/vm/kojivmd b/vm/kojivmd index 77ee051..b37a955 100755 --- a/vm/kojivmd +++ b/vm/kojivmd @@ -41,14 +41,14 @@ from optparse import OptionParser import libvirt import libxml2 import requests -import rpm import six.moves.xmlrpc_client import six.moves.xmlrpc_server import koji import koji.util from koji.daemon import SCM, TaskManager -from koji.tasks import (BaseTaskHandler, MultiPlatformTask, RestartTask, +# TaskHandlers are required to be imported, do not remove them +from koji.tasks import (BaseTaskHandler, MultiPlatformTask, RestartTask, # noqa: F401 RestartVerifyTask, ServerExit, ServerRestart) try: diff --git a/www/lib/kojiweb/util.py b/www/lib/kojiweb/util.py index 4946261..3e8a08c 100644 --- a/www/lib/kojiweb/util.py +++ b/www/lib/kojiweb/util.py @@ -27,7 +27,6 @@ import hashlib import os import ssl import stat -import time #a bunch of exception classes that explainError needs from socket import error as socket_error from xml.parsers.expat import ExpatError