From 95c6713586c65d105483e09a0c2e608709c34239 Mon Sep 17 00:00:00 2001 From: grey-cat-1908 <61203964+grey-cat-1908@users.noreply.github.com> Date: Sun, 27 Mar 2022 00:10:52 +0300 Subject: [PATCH] elif => if (return statement before elif) --- melisa/utils/api_model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/melisa/utils/api_model.py b/melisa/utils/api_model.py index 0a40ec3..a3a79ad 100644 --- a/melisa/utils/api_model.py +++ b/melisa/utils/api_model.py @@ -32,18 +32,18 @@ def to_dict_without_none(model): return dict(result) - elif isinstance(model, tuple) and hasattr(model, "_fields"): + if isinstance(model, tuple) and hasattr(model, "_fields"): return type(model)(*[to_dict_without_none(v) for v in model]) - elif isinstance(model, (list, tuple)): + if isinstance(model, (list, tuple)): return type(model)(to_dict_without_none(v) for v in model) - elif isinstance(model, dict): + if isinstance(model, dict): return type(model)( (to_dict_without_none(k), to_dict_without_none(v)) for k, v in model.items() ) - else: - return copy.deepcopy(model) + + return copy.deepcopy(model) class APIModelBase: