mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 21:48:30 +00:00
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:
committed by
Anders Kaseorg
parent
1cf63eb5bf
commit
088f7ee5d6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user