Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Self
1 parent 58559e5 commit 14d7431Copy full SHA for 14d7431
1 file changed
CONTRIBUTING.md
@@ -373,6 +373,10 @@ are not sure whether exceptions are suppressed or not or if the
373
context manager is meant to be subclassed, pick `Optional[bool]`.
374
See https://github.com/python/mypy/issues/7214 for more details.
375
376
+`__enter__` methods and other methods that return instances of the
377
+current class should be annotated with the `_typeshed.Self` type
378
+variable ([example](https://github.com/python/typeshed/pull/5698)).
379
+
380
A few guidelines for protocol names below. In cases that don't fall
381
into any of those categories, use your best judgement.
382
0 commit comments