Skip to content

Commit

Permalink
tree-wide: remove unused imports
Browse files Browse the repository at this point in the history
./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 <[email protected]>
  • Loading branch information
ignatenkobrain committed Dec 19, 2016
1 parent 7d71e9f commit 8268eb4
Show file tree
Hide file tree
Showing 24 changed files with 20 additions and 30 deletions.
1 change: 0 additions & 1 deletion mesonbuild/backend/vs2010backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import os, sys
import pickle
import re
import xml.dom.minidom
import xml.etree.ElementTree as ET

Expand Down
1 change: 0 additions & 1 deletion mesonbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
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

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/mesonlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/modules/pkgconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/modules/qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions mesonbuild/scripts/meson_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import argparse
import pickle
import platform
import subprocess

from ..mesonlib import MesonException, Popen_safe
from ..mesonlib import Popen_safe

options = None

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/scripts/meson_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
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

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/scripts/scanbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mesonbuild/scripts/symbolextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions mesonbuild/scripts/yelphelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down
2 changes: 1 addition & 1 deletion run_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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.
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand All @@ -34,7 +33,6 @@

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):
Expand All @@ -49,7 +47,7 @@ def run(self):
# 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)
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/107 postconf/postconf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import sys, os
import os

template = '''#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/113 generatorcustom/catter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import sys, os
import sys

output = sys.argv[-1]
inputs = sys.argv[1:-1]
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/113 generatorcustom/gen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

import sys, os
import sys

ifile = sys.argv[1]
ofile = sys.argv[2]
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/129 object only target/obj_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test cases/common/59 object generator/obj_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python

import os
import sys

with open(sys.argv[1], 'w') as f:
Expand Down
1 change: 0 additions & 1 deletion test cases/common/98 gen extra/srcgen.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3

import sys
import os
import argparse

parser = argparse.ArgumentParser()
Expand Down
1 change: 0 additions & 1 deletion test cases/vala/8 generated sources/src/copy_file.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3

import os
import sys
import shutil

Expand Down

0 comments on commit 8268eb4

Please sign in to comment.