Fix docstrings not exposed on public API.

This commit is contained in:
Pavel Minaev 2022-05-23 12:45:59 -07:00 committed by Pavel Minaev
parent ccce63e112
commit d2aa99f56d
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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