Patchwork D7278: procutil: suppress pytype warnings around windows-only attributes

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:33 a.m.
Message ID <74ea8384811d1672c2a7ead515102c13@localhost.localdomain>
Download mbox | patch
Permalink /patch/42874/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:33 a.m.
Closed by commit rHG54f4d094bab1: procutil: suppress pytype warnings around windows-only attributes (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7278?vs=17668&id=17693

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7278/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7278

AFFECTED FILES
  mercurial/utils/procutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

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(  # 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