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 7c53c53 commit 7db8b7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hypothesis-python/src/hypothesis/extra/ghostwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,10 @@ 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 is st.from_type or strategy.function.__name__ is st.from_regex.__name__:
if (
strategy.function is st.from_type
or strategy.function.__name__ is st.from_regex.__name__
):
return _imports_for_object(strategy._LazyStrategy__args[0])
elif _get_module(strategy.function).startswith("hypothesis.extra."):
return {(_get_module(strategy.function), strategy.function.__name__)}
Expand Down

0 comments on commit 7db8b7a

Please sign in to comment.