# HG changeset patch # User Thomas De Schampheleire # Date 1535653703 -7200 # 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 -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/cache_keys.py --- a/kallithea/lib/paster_commands/cache_keys.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/cache_keys.py Thu Aug 30 20:28:23 2018 +0200 @@ -27,8 +27,6 @@ """ -import os -import sys from kallithea.lib.paster_commands.common import BasePasterCommand from kallithea.model.meta import Session diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/celeryd.py --- a/kallithea/lib/paster_commands/celeryd.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/celeryd.py Thu Aug 30 20:28:23 2018 +0200 @@ -4,7 +4,6 @@ import kallithea from kallithea.lib.paster_commands.common import BasePasterCommand -from kallithea.lib.utils2 import str2bool __all__ = ['Command'] diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/cleanup.py --- a/kallithea/lib/paster_commands/cleanup.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/cleanup.py Thu Aug 30 20:28:23 2018 +0200 @@ -28,7 +28,6 @@ import os -import sys import re import shutil import datetime diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/install_iis.py --- a/kallithea/lib/paster_commands/install_iis.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/install_iis.py Thu Aug 30 20:28:23 2018 +0200 @@ -20,7 +20,6 @@ import os -import sys from kallithea.lib.paster_commands.common import BasePasterCommand diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/ishell.py --- a/kallithea/lib/paster_commands/ishell.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/ishell.py Thu Aug 30 20:28:23 2018 +0200 @@ -26,7 +26,6 @@ """ -import os import sys # imports, used in IPython shell diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/make_index.py --- a/kallithea/lib/paster_commands/make_index.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/make_index.py Thu Aug 30 20:28:23 2018 +0200 @@ -28,7 +28,6 @@ import os import sys -from os.path import dirname from string import strip from kallithea.model.repo import RepoModel diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/make_rcextensions.py --- a/kallithea/lib/paster_commands/make_rcextensions.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/make_rcextensions.py Thu Aug 30 20:28:23 2018 +0200 @@ -27,7 +27,6 @@ import os -import sys import pkg_resources from kallithea.lib.paster_commands.common import ask_ok, BasePasterCommand diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/repo_scan.py --- a/kallithea/lib/paster_commands/repo_scan.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/repo_scan.py Thu Aug 30 20:28:23 2018 +0200 @@ -26,8 +26,6 @@ """ -import os -import sys from kallithea.model.scm import ScmModel from kallithea.lib.paster_commands.common import BasePasterCommand diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/setup_db.py --- a/kallithea/lib/paster_commands/setup_db.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/setup_db.py Thu Aug 30 20:28:23 2018 +0200 @@ -19,9 +19,6 @@ """ -import os -import sys -import paste.deploy import kallithea from kallithea.lib.db_manage import DbManage diff -r 61bd3efe4a6c -r 29b8e961436f kallithea/lib/paster_commands/update_repoinfo.py --- a/kallithea/lib/paster_commands/update_repoinfo.py Wed Aug 15 00:17:24 2018 +0200 +++ b/kallithea/lib/paster_commands/update_repoinfo.py Thu Aug 30 20:28:23 2018 +0200 @@ -26,14 +26,10 @@ """ -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