Skip to content

Commit

Permalink
docs: mention @private
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Jun 20, 2023
1 parent 3cab7b9 commit 9743e63
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pdoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ class GoldenRetriever(Dog):
- If `__all__` is defined in the module, then all identifiers in that list will be considered public.
No other identifiers will be considered public.
- If `__all__` is not defined, then pdoc will consider all members public that
1. do not start with an underscore
1. do not start with an underscore,
2. don't have `@private` in their docstring,
2. and are defined in the current module (i.e. they are not imported).
In general, we recommend keeping these conventions:
- If you want to document a private member, consider making it public.
- If you want to hide a public member, consider making it private.
- If you want to hide a public member, consider making it private or add `@private` to their docstring,
- If you want to document a special `__dunder__` method, the recommended way to do so is
to not document the dunder method specifically, but to add some usage examples in the class documentation.
Expand Down

0 comments on commit 9743e63

Please sign in to comment.