Skip to content

Commit 565a1a0

Browse files
authored
Remove note about Optional still being necessary sometimes (#9687)
1 parent 0ef9c3f commit 565a1a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ Some further tips for good type hints:
435435
* use built-in generics (`list`, `dict`, `tuple`, `set`), instead
436436
of importing them from `typing`.
437437
* use `X | Y` instead of `Union[X, Y]` and `X | None`, instead of
438-
`Optional[X]`, **except** when it is not possible due to mypy bugs (type aliases and base classes);
438+
`Optional[X]`;
439439
* in Python 3 stubs, import collections (`Mapping`, `Iterable`, etc.)
440440
from `collections.abc` instead of `typing`;
441441
* avoid invariant collection types (`list`, `dict`) in argument

0 commit comments

Comments
 (0)