From f8032f20d42821402a30df4a2523468da70025da Mon Sep 17 00:00:00 2001 From: DudeNr33 <3929834+DudeNr33@users.noreply.github.com> Date: Sun, 3 Apr 2022 18:30:28 +0200 Subject: [PATCH] Add example for ``broken-collections-callable`` --- doc/data/messages/b/broken-collections-callable/bad.py | 6 ++++++ doc/data/messages/b/broken-collections-callable/good.py | 5 +++++ doc/data/messages/b/broken-collections-callable/pylintrc | 3 +++ doc/data/messages/b/broken-collections-callable/related.rst | 1 + 4 files changed, 15 insertions(+) create mode 100644 doc/data/messages/b/broken-collections-callable/bad.py create mode 100644 doc/data/messages/b/broken-collections-callable/good.py create mode 100644 doc/data/messages/b/broken-collections-callable/pylintrc create mode 100644 doc/data/messages/b/broken-collections-callable/related.rst diff --git a/doc/data/messages/b/broken-collections-callable/bad.py b/doc/data/messages/b/broken-collections-callable/bad.py new file mode 100644 index 0000000000..a90a992206 --- /dev/null +++ b/doc/data/messages/b/broken-collections-callable/bad.py @@ -0,0 +1,6 @@ +from collections.abc import Callable +from typing import Optional + + +def func() -> Optional[Callable[[int], None]]: # [broken-collections-callable] + ... diff --git a/doc/data/messages/b/broken-collections-callable/good.py b/doc/data/messages/b/broken-collections-callable/good.py new file mode 100644 index 0000000000..6bad0bd0bf --- /dev/null +++ b/doc/data/messages/b/broken-collections-callable/good.py @@ -0,0 +1,5 @@ +from typing import Callable, Optional + + +def func() -> Optional[Callable[[int], None]]: + ... diff --git a/doc/data/messages/b/broken-collections-callable/pylintrc b/doc/data/messages/b/broken-collections-callable/pylintrc new file mode 100644 index 0000000000..c26e81d1c4 --- /dev/null +++ b/doc/data/messages/b/broken-collections-callable/pylintrc @@ -0,0 +1,3 @@ +[master] +py-version=3.9 +load-plugins=pylint.extensions.typing diff --git a/doc/data/messages/b/broken-collections-callable/related.rst b/doc/data/messages/b/broken-collections-callable/related.rst new file mode 100644 index 0000000000..b93a3d9615 --- /dev/null +++ b/doc/data/messages/b/broken-collections-callable/related.rst @@ -0,0 +1 @@ +- `bpo-42965 `_