From bb25260f001c741d419f5732da4431a548b0749d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 21 Sep 2017 11:48:30 -0400 Subject: flake8: Perform suggested whitespace/formatting changes This only touches newlines, spaces, and (occaisionally) commas. Anything else is left for another commit. --- mesonbuild/modules/i18n.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mesonbuild/modules/i18n.py') diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 2af09de..76edb72 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -72,8 +72,10 @@ class I18nModule(ExtensionModule): datadirs = self._get_data_dirs(state, mesonlib.stringlistify(kwargs.pop('data_dirs', []))) datadirs = '--datadirs=' + ':'.join(datadirs) if datadirs else None - command = state.environment.get_build_command() + ['--internal', 'msgfmthelper', - '@INPUT@', '@OUTPUT@', file_type, podir] + command = state.environment.get_build_command() + [ + '--internal', 'msgfmthelper', + '@INPUT@', '@OUTPUT@', file_type, podir + ] if datadirs: command.append(datadirs) -- cgit v1.1 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/i18n.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mesonbuild/modules/i18n.py') diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 76edb72..d8d539c 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys import shutil from os import path @@ -20,7 +19,7 @@ from .. import coredata, mesonlib, build from ..mesonlib import MesonException from . import ModuleReturnValue from . import ExtensionModule -from . import permittedKwargs +from ..interpreterbase import permittedKwargs PRESET_ARGS = { 'glib': [ -- cgit v1.1