Skip to content

Commit

Permalink
Recommend Self in CONTRIBUTING.md (#5699)
Browse files Browse the repository at this point in the history
Part of #5676.

Co-authored-by: Akuli <akuviljanen17@gmail.com>
  • Loading branch information
JelleZijlstra and Akuli authored Jun 27, 2021
1 parent 58559e5 commit 14d7431
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ are not sure whether exceptions are suppressed or not or if the
context manager is meant to be subclassed, pick `Optional[bool]`.
See https://github.com/python/mypy/issues/7214 for more details.

`__enter__` methods and other methods that return instances of the
current class should be annotated with the `_typeshed.Self` type
variable ([example](https://github.com/python/typeshed/pull/5698)).

A few guidelines for protocol names below. In cases that don't fall
into any of those categories, use your best judgement.

Expand Down

0 comments on commit 14d7431

Please sign in to comment.