diff --git a/src/debugpy/public_api.py b/src/debugpy/public_api.py index 36f0b513..f757fe98 100644 --- a/src/debugpy/public_api.py +++ b/src/debugpy/public_api.py @@ -3,6 +3,7 @@ # for license information. from __future__ import annotations +import functools import typing from debugpy import _version @@ -24,6 +25,7 @@ if typing.TYPE_CHECKING: def _api(cancelable=False): def apply(f): + @functools.wraps(f) def wrapper(*args, **kwargs): from debugpy.server import api diff --git a/tests/debugpy/test_docstrings.py b/tests/debugpy/test_docstrings.py index 3c08635e..3b72ca0d 100644 --- a/tests/debugpy/test_docstrings.py +++ b/tests/debugpy/test_docstrings.py @@ -14,5 +14,6 @@ def test_docstrings(): member = getattr(debugpy, attr) doc = inspect.getdoc(member) + assert doc is not None, f"debugpy.{member} doesn't have a docstring" for lineno, line in enumerate(doc.split("\n")): assert len(line) <= 72