@@ -21,8 +21,8 @@
Check for ELF files to see if a package should be 'any' architecture
"""
-import os, re
-from Namcap.util import is_elf, is_static, clean_filename
+import re
+from Namcap.util import is_elf, is_static
from Namcap.ruleclass import *
class package(TarballRule):
@@ -18,13 +18,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-import os
-
from elftools.elf.elffile import ELFFile
from elftools.elf.dynamic import DynamicSection
from elftools.elf.sections import SymbolTableSection
-from Namcap.util import is_elf, clean_filename
+from Namcap.util import is_elf
from Namcap.ruleclass import *
# Valid directories for ELF files
@@ -17,7 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-import re
from itertools import product
from Namcap.ruleclass import *
@@ -18,7 +18,6 @@
#
import os, re
-import tarfile
from Namcap.ruleclass import *
class FHSRule(TarballRule):
@@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-import os
from Namcap.ruleclass import *
from Namcap.util import is_java
@@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-import os
from Namcap.ruleclass import *
class MimeDesktopRule(TarballRule):
@@ -21,7 +21,6 @@
"""Checks dependencies on programs specified in shebangs."""
-import os
import shutil
import Namcap.package
from Namcap.util import is_script, script_type
@@ -30,7 +30,6 @@ from Namcap.ruleclass import *
from Namcap.util import is_elf
from Namcap.rules.rpath import get_rpaths
-from elftools.elf.enums import ENUM_D_TAG
from elftools.elf.elffile import ELFFile
from elftools.elf.dynamic import DynamicSection
@@ -20,7 +20,7 @@
import os, subprocess, re
import tempfile
-from Namcap.util import is_elf, clean_filename
+from Namcap.util import is_elf
from Namcap.ruleclass import *
libre = re.compile('^\t(/.*)')
@@ -19,7 +19,6 @@
# USA
#
-import unittest
from Namcap.tests.pkgbuild_test import PkgbuildTest
import Namcap.rules.carch as module
@@ -17,7 +17,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-import os
import re
def _file_has_magic(fileobj, magic_bytes):
@@ -20,14 +20,9 @@
#
import getopt
-import imp
import os
-import re
-import shutil
-import string
import sys
import tarfile
-import types
import Namcap.depends
import Namcap.tags
Remove unused imports tree-wide, which also resolves the deprecationwarning for the imp module import which is now printed to stdout. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> --- Namcap/rules/anyelf.py | 4 ++-- Namcap/rules/elffiles.py | 4 +--- Namcap/rules/extravars.py | 1 - Namcap/rules/fhs.py | 1 - Namcap/rules/javafiles.py | 1 - Namcap/rules/mimefiles.py | 1 - Namcap/rules/shebangdepends.py | 1 - Namcap/rules/sodepends.py | 1 - Namcap/rules/unusedsodepends.py | 2 +- Namcap/tests/pkgbuild/test_carch.py | 1 - Namcap/util.py | 1 - namcap.py | 5 ----- 12 files changed, 4 insertions(+), 19 deletions(-)