tree-wide: remove unused imports

./setup.py:17:1: F401 'os' imported but unused
import os
^
./setup.py:37:1: F401 'stat.ST_MODE' imported but unused
from stat import ST_MODE
^
./run_tests.py:17:1: F401 'os' imported but unused
import subprocess, sys, os
^
./run_tests.py:18:1: F401 'shutil' imported but unused
import shutil
^
./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused
from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency
^
./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused
from . import coredata
^
./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/interpreter.py:32:1: F401 're' imported but unused
import os, sys, subprocess, shutil, uuid, re
^
./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused
import os, stat, glob, subprocess, shutil
^
./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused
import platform, subprocess, operator, os, shutil, re, sys
^
./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused
import os, subprocess
^
./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused
from .. import coredata, build
^
./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused
import subprocess
^
./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused
import os, sys, subprocess
^
./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException, Popen_safe
^
./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused
import sys, os
^
./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused
from ..mesonlib import MesonException
^
./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused
import re
^
./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused
import sys, os
^
./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^
./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused
import os
^
./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused
import os
^
./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused
import sys, os
^
./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused
import sys, shutil, subprocess
^

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/1233/head
Igor Gnatenko 8 years ago
parent 7d71e9f8b2
commit 8268eb4959
  1. 1
      mesonbuild/backend/vs2010backend.py
  2. 1
      mesonbuild/build.py
  3. 2
      mesonbuild/dependencies.py
  4. 2
      mesonbuild/interpreter.py
  5. 2
      mesonbuild/mesonlib.py
  6. 2
      mesonbuild/modules/pkgconfig.py
  7. 2
      mesonbuild/modules/qt5.py
  8. 3
      mesonbuild/scripts/meson_exe.py
  9. 2
      mesonbuild/scripts/meson_install.py
  10. 2
      mesonbuild/scripts/scanbuild.py
  11. 4
      mesonbuild/scripts/symbolextractor.py
  12. 3
      mesonbuild/scripts/yelphelper.py
  13. 3
      run_tests.py
  14. 2
      run_unittests.py
  15. 4
      setup.py
  16. 2
      test cases/common/107 postconf/postconf.py
  17. 2
      test cases/common/113 generatorcustom/catter.py
  18. 2
      test cases/common/113 generatorcustom/gen.py
  19. 2
      test cases/common/129 object only target/obj_generator.py
  20. 2
      test cases/common/57 custom target chain/usetarget/subcomp.py
  21. 2
      test cases/common/59 object generator/obj_generator.py
  22. 1
      test cases/common/95 dep fallback/subprojects/boblib/genbob.py
  23. 1
      test cases/common/98 gen extra/srcgen.py
  24. 1
      test cases/vala/8 generated sources/src/copy_file.py

@ -14,7 +14,6 @@
import os, sys
import pickle
import re
import xml.dom.minidom
import xml.etree.ElementTree as ET

@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from . import coredata
from . import environment
from . import dependencies
from . import mlog

@ -20,7 +20,7 @@
# package before this gets too big.
import re
import os, stat, glob, subprocess, shutil
import os, stat, glob, shutil
import sysconfig
from collections import OrderedDict
from . mesonlib import MesonException, version_compare, version_compare_many, Popen_safe

@ -29,7 +29,7 @@ from .interpreterbase import check_stringlist, noPosargs, noKwargs, stringArgs
from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode
from .interpreterbase import InterpreterObject, MutableInterpreterObject
import os, sys, subprocess, shutil, uuid, re
import os, sys, shutil, uuid
import importlib

@ -14,7 +14,7 @@
"""A library of random helper functionality."""
import platform, subprocess, operator, os, shutil, re, sys
import platform, subprocess, operator, os, shutil, re
from glob import glob

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .. import coredata, build
from .. import build
from .. import mesonlib
from .. import mlog
import os

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os, subprocess
import os
from .. import mlog
from .. import build
from ..mesonlib import MesonException, Popen_safe

@ -17,9 +17,8 @@ import sys
import argparse
import pickle
import platform
import subprocess
from ..mesonlib import MesonException, Popen_safe
from ..mesonlib import Popen_safe
options = None

@ -16,7 +16,7 @@ import sys, pickle, os, shutil, subprocess, gzip, platform
from glob import glob
from . import depfixer
from . import destdir_join
from ..mesonlib import MesonException, Popen_safe
from ..mesonlib import Popen_safe
install_log_file = None

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import sys, os
import os
import subprocess
import shutil
import tempfile

@ -20,9 +20,9 @@
# This file is basically a reimplementation of
# http://cgit.freedesktop.org/libreoffice/core/commit/?id=3213cd54b76bc80a6f0516aac75a48ff3b2ad67c
import os, sys, subprocess
import os, sys
from .. import mesonlib
from ..mesonlib import MesonException, Popen_safe
from ..mesonlib import Popen_safe
import argparse
parser = argparse.ArgumentParser()

@ -12,12 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import sys, os
import os
import subprocess
import shutil
import argparse
from .. import mlog
from ..mesonlib import MesonException
from . import destdir_join
parser = argparse.ArgumentParser()

@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import subprocess, sys, os
import shutil
import subprocess, sys
from mesonbuild import mesonlib
if __name__ == '__main__':

@ -20,7 +20,7 @@ import tempfile
from glob import glob
import mesonbuild.environment
from mesonbuild.environment import detect_ninja
from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency
from mesonbuild.dependencies import PkgConfigDependency
def get_soname(fname):
# HACK, fix to not use shell.

@ -16,7 +16,6 @@
import os
import sys
from os import path
if sys.version_info[0] < 3:
print('Tried to install with Python 2, Meson only supports Python 3.')
@ -34,7 +33,6 @@ except ImportError:
from distutils.file_util import copy_file
from distutils.dir_util import mkpath
from stat import ST_MODE
class install_scripts(orig):
def run(self):
@ -49,7 +47,7 @@ class install_scripts(orig):
# We want the files to be installed without a suffix on Unix
for infile in self.get_inputs():
in_stripped = infile[:-3] if infile.endswith('.py') else infile
outfile = path.join(self.install_dir, in_stripped)
outfile = os.path.join(self.install_dir, in_stripped)
# NOTE: Mode is preserved by default
copy_file(infile, outfile, dry_run=self.dry_run)
self.outfiles.append(outfile)

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import sys, os
import os
template = '''#pragma once

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import sys, os
import sys
output = sys.argv[-1]
inputs = sys.argv[1:-1]

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import sys, os
import sys
ifile = sys.argv[1]
ofile = sys.argv[2]

@ -2,7 +2,7 @@
# Mimic a binary that generates an object file (e.g. windres).
import sys, shutil, subprocess
import sys, subprocess
if __name__ == '__main__':
if len(sys.argv) != 4:

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import sys, os
import sys
with open(sys.argv[1], 'rb') as ifile:
with open(sys.argv[2], 'w') as ofile:

@ -2,7 +2,7 @@
# Mimic a binary that generates an object file (e.g. windres).
import sys, shutil, subprocess
import sys, subprocess
if __name__ == '__main__':
if len(sys.argv) != 4:

@ -1,6 +1,5 @@
#!/usr/bin/env python
import os
import sys
with open(sys.argv[1], 'w') as f:

@ -1,7 +1,6 @@
#!/usr/bin/env python3
import sys
import os
import argparse
parser = argparse.ArgumentParser()

@ -1,6 +1,5 @@
#!/usr/bin/env python3
import os
import sys
import shutil

Loading…
Cancel
Save