Skip to content
Snippets Groups Projects

Update with_classes parameter

Merged Valentin Rigal requested to merge update-class-filters into master
1 file
+ 4
12
Compare changes
  • Side-by-side
  • Inline
@@ -188,12 +188,11 @@ class ElementMixin(object):
def list_element_children(
self,
element,
best_class=None,
folder=None,
name=None,
recursive=None,
type=None,
with_best_classes=None,
with_classes=None,
with_corpus=None,
with_has_children=None,
with_zone=None,
@@ -206,11 +205,6 @@ class ElementMixin(object):
element, (Element, CachedElement)
), "element shouldn't be null and should be an Element or CachedElement"
query_params = {}
if best_class is not None:
assert isinstance(best_class, str) or isinstance(
best_class, bool
), "best_class should be of type str or bool"
query_params["best_class"] = best_class
if folder is not None:
assert isinstance(folder, bool), "folder should be of type bool"
query_params["folder"] = folder
@@ -223,11 +217,9 @@ class ElementMixin(object):
if type:
assert isinstance(type, str), "type should be of type str"
query_params["type"] = type
if with_best_classes is not None:
assert isinstance(
with_best_classes, bool
), "with_best_classes should be of type bool"
query_params["with_best_classes"] = with_best_classes
if with_classes is not None:
assert isinstance(with_classes, bool), "with_classes should be of type bool"
query_params["with_classes"] = with_classes
if with_corpus is not None:
assert isinstance(with_corpus, bool), "with_corpus should be of type bool"
query_params["with_corpus"] = with_corpus
Loading