no coverage for monkeypatched properties

This commit is contained in:
sneakers-the-rat 2024-05-15 14:39:17 -07:00
parent 1ffdc7cd20
commit a1786144fa
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -22,17 +22,17 @@ def patch_npytyping_perf() -> None:
# make a new __module__ methods for the affected classes
def new_module_ndarray(cls) -> str:
def new_module_ndarray(cls) -> str: # pragma: no cover
return cls._get_module(inspect.currentframe(), "nptyping.ndarray")
def new_module_recarray(cls) -> str:
def new_module_recarray(cls) -> str: # pragma: no cover
return cls._get_module(inspect.currentframe(), "nptyping.recarray")
def new_module_dataframe(cls) -> str:
def new_module_dataframe(cls) -> str: # pragma: no cover
return cls._get_module(inspect.currentframe(), "nptyping.pandas_.dataframe")
# and a new _get_module method for the parent class
def new_get_module(cls, stack: FrameType, module: str) -> str:
def new_get_module(cls, stack: FrameType, module: str) -> str: # pragma: no cover
return (
"typing"
if inspect.getframeinfo(stack.f_back).function == "formatannotation"