Skip to content

Commit

Permalink
makes more_itertools import dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasohara committed Jan 15, 2024
1 parent c903286 commit bce410a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mezcla/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import time

# Installed packages
import more_itertools
## NOTE: made dynamic due to import issue during shell-script repo tests
## TODO3: import more_itertools

# Local packages
from mezcla import debug
Expand Down Expand Up @@ -232,6 +233,8 @@ def trace_named_objects(level, list_text):

def exactly1(items):
"""Whether one and only one if ITEMS is true"""
## TEMP: does import here to avoid problem with mezcla package install
import more_itertools # pylint: disable=import-outside-toplevel
ok = more_itertools.exactly_n(items, 1)
debug.trace(4, f"exactly1({items}) => {ok}")
return ok
Expand Down

0 comments on commit bce410a

Please sign in to comment.