From 19cc15d62721bb183530aa693c04b3395cffbe94 Mon Sep 17 00:00:00 2001 From: Leif Warland Date: Wed, 7 Jun 2023 19:30:48 +0200 Subject: [PATCH] Make hypothesis dependency optional (#1215) (#1216) Signed-off-by: Leif Warland --- pandera/strategies/pandas_strategies.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandera/strategies/pandas_strategies.py b/pandera/strategies/pandas_strategies.py index ef03068b1..f5e5cf318 100644 --- a/pandera/strategies/pandas_strategies.py +++ b/pandera/strategies/pandas_strategies.py @@ -20,6 +20,7 @@ Any, Callable, Dict, + Generic, List, Optional, Sequence, @@ -51,8 +52,10 @@ from hypothesis.strategies import SearchStrategy, composite except ImportError: # pragma: no cover + T = TypeVar("T") + # pylint: disable=too-few-public-methods - class SearchStrategy: # type: ignore + class SearchStrategy(Generic[T]): # type: ignore """placeholder type.""" def composite(fn): # type: ignore