From patchwork Wed Nov 6 22:58:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7278: procutil: suppress pytype warnings around windows-only attributes From: phabricator X-Patchwork-Id: 42829 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 6 Nov 2019 22:58:39 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7278 AFFECTED FILES mercurial/utils/procutil.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py +++ b/mercurial/utils/procutil.py @@ -378,7 +378,9 @@ if pycompat.iswindows: def shelltonative(cmd, env): - return platform.shelltocmdexe(cmd, shellenviron(env)) + return platform.shelltocmdexe( + cmd, shellenviron(env) + ) # pytype: disable=module-attr tonativestr = encoding.strfromlocal else: @@ -545,7 +547,9 @@ # Following creation flags might create a console GUI window. # Using subprocess.CREATE_NEW_CONSOLE might helps. # See https://phab.mercurial-scm.org/D1701 for discussion - _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP + _creationflags = ( + DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP + ) # pytype: disable=module-attr def runbgcommand( script, env, shell=False, stdout=None, stderr=None, ensurestart=True