From 4dbbb4884c205a1b82ac0deb9c751161a44534fd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 21 Sep 2017 11:49:00 -0400 Subject: flake8: Clean up complained-about unused imports This also adds a "# noqa: F401" comment on an unused "import lzma", which we are using it in a try/except block that is being used to check if the lzma module is importable; of course it is unused. v2: This turned out to be a little tricky. mesonbuild/modules/__init__.py had the "unused" import: from ..interpreterbase import permittedKwargs, noKwargs However, that meant that the various modules could do things like: from . import noKwargs # "." is "mesonbuild.modules" Which breaks when you remove __init__.py's "unused" import. I could have tagged that import with "# noqa: F401", but instead I chose to have each of the module import directly from "..interpreterbase" instead of ".". --- mesonbuild/modules/qt4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/modules/qt4.py') diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py index 37e630b..a63aff8 100644 --- a/mesonbuild/modules/qt4.py +++ b/mesonbuild/modules/qt4.py @@ -20,7 +20,7 @@ from ..dependencies import Qt4Dependency from . import ExtensionModule import xml.etree.ElementTree as ET from . import ModuleReturnValue -from . import permittedKwargs +from ..interpreterbase import permittedKwargs class Qt4Module(ExtensionModule): tools_detected = False -- cgit v1.1