# HG changeset patch # User Thomas De Schampheleire # Date 2018-08-30 20:28:23 # Node ID 29b8e961436f716186681110004220aea8adc494 # Parent 61bd3efe4a6c2f68e88313d0aa237188145fa558 paster_commands: remove unused imports Remove some unused imports, using 'autoflake' followed by manual redacting. find kallithea/lib/paster_commands/ -name "*.py" \ | xargs autoflake --remove-all-unused-imports -i This same command could be applied gradually throughout the code base as areas are touched. Since autoflake may be too greedy in special cases, it is more difficult to do a big-bang action over all code. diff --git a/kallithea/lib/paster_commands/cache_keys.py b/kallithea/lib/paster_commands/cache_keys.py --- a/kallithea/lib/paster_commands/cache_keys.py +++ b/kallithea/lib/paster_commands/cache_keys.py @@ -27,8 +27,6 @@ Original author and date, and relevant c """ -import os -import sys from kallithea.lib.paster_commands.common import BasePasterCommand from kallithea.model.meta import Session diff --git a/kallithea/lib/paster_commands/celeryd.py b/kallithea/lib/paster_commands/celeryd.py --- a/kallithea/lib/paster_commands/celeryd.py +++ b/kallithea/lib/paster_commands/celeryd.py @@ -4,7 +4,6 @@ import argparse import kallithea from kallithea.lib.paster_commands.common import BasePasterCommand -from kallithea.lib.utils2 import str2bool __all__ = ['Command'] diff --git a/kallithea/lib/paster_commands/cleanup.py b/kallithea/lib/paster_commands/cleanup.py --- a/kallithea/lib/paster_commands/cleanup.py +++ b/kallithea/lib/paster_commands/cleanup.py @@ -28,7 +28,6 @@ Original author and date, and relevant c import os -import sys import re import shutil import datetime diff --git a/kallithea/lib/paster_commands/install_iis.py b/kallithea/lib/paster_commands/install_iis.py --- a/kallithea/lib/paster_commands/install_iis.py +++ b/kallithea/lib/paster_commands/install_iis.py @@ -20,7 +20,6 @@ IIS installation tools for Kallithea import os -import sys from kallithea.lib.paster_commands.common import BasePasterCommand diff --git a/kallithea/lib/paster_commands/ishell.py b/kallithea/lib/paster_commands/ishell.py --- a/kallithea/lib/paster_commands/ishell.py +++ b/kallithea/lib/paster_commands/ishell.py @@ -26,7 +26,6 @@ Original author and date, and relevant c """ -import os import sys # imports, used in IPython shell diff --git a/kallithea/lib/paster_commands/make_index.py b/kallithea/lib/paster_commands/make_index.py --- a/kallithea/lib/paster_commands/make_index.py +++ b/kallithea/lib/paster_commands/make_index.py @@ -28,7 +28,6 @@ Original author and date, and relevant c import os import sys -from os.path import dirname from string import strip from kallithea.model.repo import RepoModel diff --git a/kallithea/lib/paster_commands/make_rcextensions.py b/kallithea/lib/paster_commands/make_rcextensions.py --- a/kallithea/lib/paster_commands/make_rcextensions.py +++ b/kallithea/lib/paster_commands/make_rcextensions.py @@ -27,7 +27,6 @@ Original author and date, and relevant c import os -import sys import pkg_resources from kallithea.lib.paster_commands.common import ask_ok, BasePasterCommand diff --git a/kallithea/lib/paster_commands/repo_scan.py b/kallithea/lib/paster_commands/repo_scan.py --- a/kallithea/lib/paster_commands/repo_scan.py +++ b/kallithea/lib/paster_commands/repo_scan.py @@ -26,8 +26,6 @@ Original author and date, and relevant c """ -import os -import sys from kallithea.model.scm import ScmModel from kallithea.lib.paster_commands.common import BasePasterCommand diff --git a/kallithea/lib/paster_commands/setup_db.py b/kallithea/lib/paster_commands/setup_db.py --- a/kallithea/lib/paster_commands/setup_db.py +++ b/kallithea/lib/paster_commands/setup_db.py @@ -19,9 +19,6 @@ Databaset setup gearbox command for Kall """ -import os -import sys -import paste.deploy import kallithea from kallithea.lib.db_manage import DbManage diff --git a/kallithea/lib/paster_commands/update_repoinfo.py b/kallithea/lib/paster_commands/update_repoinfo.py --- a/kallithea/lib/paster_commands/update_repoinfo.py +++ b/kallithea/lib/paster_commands/update_repoinfo.py @@ -26,14 +26,10 @@ Original author and date, and relevant c """ -import os -import sys -import string from kallithea.lib.paster_commands.common import BasePasterCommand from kallithea.lib.utils2 import safe_unicode from kallithea.model.db import Repository -from kallithea.model.repo import RepoModel from kallithea.model.meta import Session