Skip to content

Commit

Permalink
remove unused optional parameters in Unfinished __call__: print_all_n…
Browse files Browse the repository at this point in the history
…amed_sequences, print_all_sequences, print_input, print_all
  • Loading branch information
gailweiss committed Feb 5, 2024
1 parent dbe50c6 commit a10c438
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions RASP_support/FunctionalSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,7 @@ def get_sorted_full_parents(self):
self._sort_full_parents()
return copy(self._sorted_full_parents)

def __call__(self, w, print_all_named_sequences=False, print_input=False,
print_all_sequences=False, print_all=False, topcall=True,
just_pass_exception_up=False):
def __call__(self, w, topcall=True, just_pass_exception_up=False):
if (not isinstance(w, Iterable)) or (not w):
raise RASPTypeError(
"RASP sequences/selectors expect non-empty iterables, got: "
Expand Down Expand Up @@ -206,13 +204,8 @@ def __call__(self, w, print_all_named_sequences=False, print_input=False,
unf(w, topcall=False,
just_pass_exception_up=just_pass_exception_up)

p_a_n_s = print_all_named_sequences
j_p_e_u = just_pass_exception_up
args = tuple(p(w,
print_all_named_sequences=p_a_n_s,
print_input=print_input,
print_all_sequences=print_all_sequences,
print_all=print_all,
topcall=False,
just_pass_exception_up=j_p_e_u)
for p in self.parents_tuple)
Expand Down Expand Up @@ -253,20 +246,6 @@ def __call__(self, w, print_all_named_sequences=False, print_input=False,

self.last_w, self.last_res = w, res

def should_print():
if isinstance(res, Sequence):
if print_all_named_sequences and self.name not in plain_names:
return True
if print_all_sequences:
return True
if self.is_toplevel_input and print_input:
return True
return print_all
if should_print():
print("resolved \""+self.name +
(("\" from:\" "+str(self.get_own_root_input(w))+" \"")
if print_root_inputs_too else ""),
":\n\t", res)
return res


Expand Down

0 comments on commit a10c438

Please sign in to comment.