aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-03-03 15:56:33 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-03-03 21:06:45 +0000
commitcd5dba5358e8a4f7a9d4a1ebf315db1f65c87180 (patch)
treecf5a049f7402680fbc28e775a0e489bcf16a7d43
parent275c737d571709f0653c24d18a3adb14bbd9cb2f (diff)
downloadmeson-cd5dba5358e8a4f7a9d4a1ebf315db1f65c87180.zip
meson-cd5dba5358e8a4f7a9d4a1ebf315db1f65c87180.tar.gz
meson-cd5dba5358e8a4f7a9d4a1ebf315db1f65c87180.tar.bz2
Fix flake8 'imported but unused' reports
$ flake8 | grep F401 ./meson.py:17:1: F401 'mesonbuild.mesonlib' imported but unused ./meson.py:18:1: F401 'locale' imported but unused ./run_unittests.py:24:1: F401 'sys' imported but unused ./mesonbuild/minit.py:2:1: F401 'pyclbr.Function' imported but unused ./mesonbuild/minit.py:18:1: F401 'os' imported but unused ./mesonbuild/backend/vs2010backend.py:15:1: F401 'sys' imported but unused ./mesonbuild/backend/xcodebackend.py:19:1: F401 'sys' imported but unused ./mesonbuild/dependencies/ui.py:20:1: F401 'shutil' imported but unused ./mesonbuild/modules/python3.py:15:1: F401 'sys' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..compilers' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..mlog' imported but unused ./test cases/common/98 gen extra/srcgen3.py:3:1: F401 'os' imported but unused
-rwxr-xr-xmeson.py4
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/backend/xcodebackend.py2
-rw-r--r--mesonbuild/dependencies/ui.py1
-rw-r--r--mesonbuild/minit.py3
-rw-r--r--mesonbuild/modules/python3.py1
-rw-r--r--mesonbuild/modules/unstable_icestorm.py2
-rwxr-xr-xrun_unittests.py1
-rw-r--r--test cases/common/98 gen extra/srcgen3.py1
9 files changed, 6 insertions, 11 deletions
diff --git a/meson.py b/meson.py
index 13bc870..abbac6f 100755
--- a/meson.py
+++ b/meson.py
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from mesonbuild import mesonmain, mesonlib
-import sys, os, locale
+from mesonbuild import mesonmain
+import sys, os
def main():
# Always resolve the command path so Ninja can find it for regen, tests, etc.
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 057e7c9..7f4c2ef 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os, sys
+import os
import pickle
import xml.dom.minidom
import xml.etree.ElementTree as ET
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 3ae31e4..fae5889 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -16,7 +16,7 @@ from . import backends
from .. import build
from .. import dependencies
from .. import mesonlib
-import uuid, os, sys
+import uuid, os
from ..mesonlib import MesonException
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index 3e2d170..a84decf 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -17,7 +17,6 @@
import os
import re
-import shutil
import subprocess
from collections import OrderedDict
diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py
index 98817cb..62e2639 100644
--- a/mesonbuild/minit.py
+++ b/mesonbuild/minit.py
@@ -1,5 +1,4 @@
# Copyright 2017 The Meson development team
-from pyclbr import Function
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,7 +14,7 @@ from pyclbr import Function
"""Code that creates simple startup projects."""
-import os, sys, argparse, re
+import sys, argparse, re
from glob import glob
lib_h_template = '''#pragma once
diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py
index 989e839..9fd9f80 100644
--- a/mesonbuild/modules/python3.py
+++ b/mesonbuild/modules/python3.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import sys
import sysconfig
from .. import mesonlib, dependencies
diff --git a/mesonbuild/modules/unstable_icestorm.py b/mesonbuild/modules/unstable_icestorm.py
index 0b7b339..761d583 100644
--- a/mesonbuild/modules/unstable_icestorm.py
+++ b/mesonbuild/modules/unstable_icestorm.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from .. import mesonlib, compilers, mlog
+from .. import mesonlib
from . import ExtensionModule
diff --git a/run_unittests.py b/run_unittests.py
index b69aaae..a6d28c8 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -21,7 +21,6 @@ import tempfile
import textwrap
import os
import shutil
-import sys
import unittest
from unittest import mock
from configparser import ConfigParser
diff --git a/test cases/common/98 gen extra/srcgen3.py b/test cases/common/98 gen extra/srcgen3.py
index ad0a5cb..b737114 100644
--- a/test cases/common/98 gen extra/srcgen3.py
+++ b/test cases/common/98 gen extra/srcgen3.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
-import os
import sys
import argparse