Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 1, 2023
1 parent be739ee commit 82cb9cd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/biocutils/print_truncated.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ def print_truncated_list(
"""
collected = []
if transform is None:

def transform(y):
return print_truncated(y, truncated_to=truncated_to, full_threshold=full_threshold)
return print_truncated(
y, truncated_to=truncated_to, full_threshold=full_threshold
)

if len(x) > full_threshold and len(x) > truncated_to * 2:
for i in range(truncated_to):
Expand Down Expand Up @@ -126,8 +129,11 @@ def print_truncated_dict(
"""
collected = []
if transform is None:

def transform(y):
return print_truncated(y, truncated_to=truncated_to, full_threshold=full_threshold)
return print_truncated(
y, truncated_to=truncated_to, full_threshold=full_threshold
)

all_keys = x.keys()
if len(x) > full_threshold and len(x) > truncated_to * 2:
Expand Down

0 comments on commit 82cb9cd

Please sign in to comment.