changeset 43526:54f4d094bab1

procutil: suppress pytype warnings around windows-only attributes Differential Revision: https://phab.mercurial-scm.org/D7278
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 15:12:46 -0500
parents 147576a4e6a2
children 8e89b6e1e0cd
files mercurial/utils/procutil.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/procutil.py	Wed Nov 06 15:03:02 2019 -0500
+++ b/mercurial/utils/procutil.py	Wed Nov 06 15:12:46 2019 -0500
@@ -378,7 +378,9 @@
 if pycompat.iswindows:
 
     def shelltonative(cmd, env):
-        return platform.shelltocmdexe(cmd, shellenviron(env))
+        return platform.shelltocmdexe(  # pytype: disable=module-attr
+            cmd, shellenviron(env)
+        )
 
     tonativestr = encoding.strfromlocal
 else:
@@ -545,7 +547,10 @@
     # 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