Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Aug 13, 2024
1 parent 81ff1c5 commit 88e289a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdoc/doc_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def _parse_class(source: str) -> ast.ClassDef:
t = tree.body[0]
assert isinstance(t, ast.ClassDef)
return t
return ast.ClassDef(body=[], decorator_list=[]) # type: ignore
return ast.ClassDef(name="pdocEmpty", body=[], decorator_list=[]) # type: ignore


@cache
Expand All @@ -265,7 +265,7 @@ def _parse_function(source: str) -> ast.FunctionDef | ast.AsyncFunctionDef:
# we have a lambda function,
# to simplify the API return the ast.FunctionDef stub.
pass
return ast.FunctionDef(body=[], decorator_list=[]) # type: ignore
return ast.FunctionDef(name="pdoc_empty", body=[], decorator_list=[]) # type: ignore


def _parse(
Expand Down

0 comments on commit 88e289a

Please sign in to comment.