Skip to content

Commit

Permalink
FIX: Use inspect.signature() on the class directly
Browse files Browse the repository at this point in the history
Fixes #124
  • Loading branch information
kernc committed Dec 8, 2019
1 parent bba5121 commit 332d09a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pdoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,7 @@ class constructor (method `__init__`). See `pdoc.Function.params`.
if name in exclusions or qualname in exclusions or refname in exclusions:
return []

params = Function._params(self.obj.__init__,
annotate=annotate, link=link, module=self.module)
params = params[1:] if params[0] == 'self' else params
return params
return Function._params(self.obj, annotate=annotate, link=link, module=self.module)

def _filter_doc_objs(self, type: Type[T], include_inherited=True,
filter_func: Callable[[T], bool] = lambda x: True,
Expand Down

0 comments on commit 332d09a

Please sign in to comment.