changeset 52699:e1c5d823287b

hghave: make the `ignorestatus` argument to `matchoutput()` a bool That's how PyCharm was seeing it because of the default param, so it was flagging the callers that passed an int. Fewer yellow ticks are better (26 remain).
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 12 Jan 2025 19:57:58 -0500
parents 6ed726d1cd16
children 1f76fd3e9f7f
files tests/hghave.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Sun Jan 12 19:55:06 2025 -0500
+++ b/tests/hghave.py	Sun Jan 12 19:57:58 2025 -0500
@@ -141,7 +141,7 @@
     return env
 
 
-def matchoutput(cmd, regexp: bytes, ignorestatus=False):
+def matchoutput(cmd, regexp: bytes, ignorestatus: bool = False):
     """Return the match object if cmd executes successfully and its output
     is matched by the supplied regular expression.
     """
@@ -813,12 +813,12 @@
 def has_osxpackaging():
     try:
         return (
-            matchoutput('pkgbuild', br'Usage: pkgbuild ', ignorestatus=1)
+            matchoutput('pkgbuild', br'Usage: pkgbuild ', ignorestatus=True)
             and matchoutput(
-                'productbuild', br'Usage: productbuild ', ignorestatus=1
+                'productbuild', br'Usage: productbuild ', ignorestatus=True
             )
-            and matchoutput('lsbom', br'Usage: lsbom', ignorestatus=1)
-            and matchoutput('xar --help', br'Usage: xar', ignorestatus=1)
+            and matchoutput('lsbom', br'Usage: lsbom', ignorestatus=True)
+            and matchoutput('xar --help', br'Usage: xar', ignorestatus=True)
         )
     except ImportError:
         return False