Skip to content

Commit

Permalink
preserve function signature and docstring in with_hv_extension (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddrjen authored Apr 27, 2021
1 parent 73bbf1c commit cccc1ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hvplot/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys

from distutils.version import LooseVersion
from functools import wraps
from types import FunctionType

import pandas as pd
Expand All @@ -24,6 +25,7 @@

def with_hv_extension(func, extension='bokeh', logo=False):
"""If hv.extension is not loaded, load before calling function"""
@wraps(func)
def wrapper(*args, **kwargs):
if extension and not getattr(hv.extension, '_loaded', False):
hv.extension(extension, logo=logo)
Expand Down

0 comments on commit cccc1ce

Please sign in to comment.