Skip to content

Commit

Permalink
Adding more options to hide or show modules/packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sachahu1 committed Jun 26, 2024
1 parent 45a074e commit d5f9e04
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions autoapi/_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ class PythonModule(TopLevelPythonPythonMapper):
type = "module"

def _should_skip(self) -> bool:
return False
skip_private_member = (
self.is_private_member and "private-members" not in self.options
)

return self.obj.get("hide", False) or skip_private_member


class PythonPackage(TopLevelPythonPythonMapper):
Expand All @@ -418,7 +422,11 @@ class PythonPackage(TopLevelPythonPythonMapper):
type = "package"

def _should_skip(self) -> bool:
return False
skip_private_member = (
self.is_private_member and "private-members" not in self.options
)

return self.obj.get("hide", False) or skip_private_member


class PythonClass(PythonObject):
Expand Down

0 comments on commit d5f9e04

Please sign in to comment.