Skip to content

Add guideline for undocumented objects #1938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ At present the core developers are (alphabetically):
* David Fisher (@ddfisher)
* Łukasz Langa (@ambv)
* Jukka Lehtosalo (@JukkaL)
* Ivan Levkivskyi (@ilevkivskyi)
* Matthias Kramm (@matthiaskramm)
* Greg Price (@gnprice)
* Guido van Rossum (@gvanrossum)
Expand Down Expand Up @@ -133,6 +134,15 @@ included in ``__all__`` (if present), and whose names do not start with an
underscore are more likely to merit inclusion in a stub. If in doubt, err
on the side of including more objects.

**NEW:** Sometimes it makes sense to include non-public objects
in a stub. Mark these with a comment of the form ``# undocumented``.
See the [motivation](https://github.com/python/typeshed/issues/1902).
Example:

```python
def list2cmdline(seq: Sequence[str]) -> str: ... # undocumented
```

### Using stubgen

Mypy includes a tool called [stubgen](https://github.com/python/mypy/blob/master/mypy/stubgen.py)
Expand Down