Skip to content

Commit ecee4ea

Browse files
committed
update decorator to allow docs
1 parent 380f25d commit ecee4ea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/nested_pandas/series/nestedseries.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
from functools import wraps
2+
13
import pandas as pd
24

35
from nested_pandas.series.dtype import NestedDtype
46

7+
__all__ = ["NestedSeries"]
8+
59

610
def nested_only(func):
711
"""Decorator to designate certain functions can only be used with NestedDtype."""
812

13+
@wraps(func) # This ensures the original function's metadata is preserved
914
def wrapper(*args, **kwargs):
1015
if not isinstance(args[0].dtype, NestedDtype):
1116
raise TypeError(f"'{func.__name__}' can only be used with a NestedDtype, not '{args[0].dtype}'.")

0 commit comments

Comments
 (0)