##// END OF EJS Templates
typing: disable a bogus attribute-error warning in phabricator...
Matt Harbison -
r50758:92743e6d default
parent child Browse files
Show More
@@ -353,11 +353,14 b' def urlencodenested(params):'
353 353 """
354 354 flatparams = util.sortdict()
355 355
356 def process(prefix, obj):
356 def process(prefix: bytes, obj):
357 357 if isinstance(obj, bool):
358 358 obj = {True: b'true', False: b'false'}[obj] # Python -> PHP form
359 359 lister = lambda l: [(b'%d' % k, v) for k, v in enumerate(l)]
360 # .items() will only be called for a dict type
361 # pytype: disable=attribute-error
360 362 items = {list: lister, dict: lambda x: x.items()}.get(type(obj))
363 # pytype: enable=attribute-error
361 364 if items is None:
362 365 flatparams[prefix] = obj
363 366 else:
General Comments 0
You need to be logged in to leave comments. Login now