hgext/phabricator.py
changeset 49863 92743e6d1a0c
parent 49849 de9ffb82ef4d
child 50929 18c8c18993f0
--- a/hgext/phabricator.py	Thu Jan 05 19:47:35 2023 -0500
+++ b/hgext/phabricator.py	Thu Jan 05 19:53:02 2023 -0500
@@ -353,11 +353,14 @@
     """
     flatparams = util.sortdict()
 
-    def process(prefix, obj):
+    def process(prefix: bytes, obj):
         if isinstance(obj, bool):
             obj = {True: b'true', False: b'false'}[obj]  # Python -> PHP form
         lister = lambda l: [(b'%d' % k, v) for k, v in enumerate(l)]
+        # .items() will only be called for a dict type
+        # pytype: disable=attribute-error
         items = {list: lister, dict: lambda x: x.items()}.get(type(obj))
+        # pytype: enable=attribute-error
         if items is None:
             flatparams[prefix] = obj
         else: