python: Convert type checks to isinstance checks.

Generated by autopep8 --aggressive, with the setup.cfg configuration
from #14532.  In general, an isinstance check may not be equivalent to
a type check because it includes subtypes; however, that’s usually
what you want.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-21 16:59:09 -07:00
committed by Anders Kaseorg
parent 1cf63eb5bf
commit 088f7ee5d6
4 changed files with 5 additions and 5 deletions

View File

@@ -148,7 +148,7 @@ cURL example.""".format(endpoint, method, param_name)
return ordered_ex_val_str # nocoverage
else:
example_value = param.get("example", DEFAULT_EXAMPLE[param_type])
if type(example_value) == bool:
if isinstance(example_value, bool):
example_value = str(example_value).lower()
if param["schema"].get("format", "") == "json":
example_value = json.dumps(example_value)