Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
JensHeinrich authored and JensHeinrich committed Feb 16, 2023
1 parent 3e64147 commit cbad1a1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hypothesis-python/src/hypothesis/extra/ghostwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,14 @@ def _imports_for_strategy(strategy):
# If we have a lazy from_type strategy, because unwrapping it gives us an
# error or invalid syntax, import that type and we're done.
if isinstance(strategy, LazyStrategy):
if (
strategy.function.__name__ in (
st.from_type.__name__, st.from_regex.__name__)
if strategy.function.__name__ in (
st.from_type.__name__,
st.from_regex.__name__,
):
return {
imp
for arg in strategy._LazyStrategy__args + strategy._LazyStrategy__kwargs.values
for arg in strategy._LazyStrategy__args
+ strategy._LazyStrategy__kwargs.values
for imp in _imports_for_object(arg)
}
elif _get_module(strategy.function).startswith("hypothesis.extra."):
Expand Down

0 comments on commit cbad1a1

Please sign in to comment.