From ad1a76d6c245052786c2674f146c5969848b6e9f Mon Sep 17 00:00:00 2001 From: jpy-git Date: Sat, 2 Apr 2022 13:29:27 +0100 Subject: [PATCH 1/4] Add `unused-wildcard-import` doc example --- doc/data/messages/u/unused-wildcard-import/bad.py | 4 ++++ doc/data/messages/u/unused-wildcard-import/good.py | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 doc/data/messages/u/unused-wildcard-import/bad.py create mode 100644 doc/data/messages/u/unused-wildcard-import/good.py diff --git a/doc/data/messages/u/unused-wildcard-import/bad.py b/doc/data/messages/u/unused-wildcard-import/bad.py new file mode 100644 index 0000000000..2817e2fa84 --- /dev/null +++ b/doc/data/messages/u/unused-wildcard-import/bad.py @@ -0,0 +1,4 @@ +from abc import * # [unused-wildcard-import] + + +class Foo(ABC): ... diff --git a/doc/data/messages/u/unused-wildcard-import/good.py b/doc/data/messages/u/unused-wildcard-import/good.py new file mode 100644 index 0000000000..88c7f81d3b --- /dev/null +++ b/doc/data/messages/u/unused-wildcard-import/good.py @@ -0,0 +1,7 @@ +# Either remove wildcard import, +# make use of every object from the wildcard import, +# or only import the required objects. +from abc import ABC + + +class Foo(ABC): ... From 2269c6708f5a2405da46d8ba51fe9af46c32424a Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 3 Apr 2022 17:30:27 +0200 Subject: [PATCH 2/4] Add details.rst --- doc/data/messages/u/unused-wildcard-import/bad.py | 2 +- doc/data/messages/u/unused-wildcard-import/detail.rst | 1 + doc/data/messages/u/unused-wildcard-import/good.py | 6 +----- 3 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 doc/data/messages/u/unused-wildcard-import/detail.rst diff --git a/doc/data/messages/u/unused-wildcard-import/bad.py b/doc/data/messages/u/unused-wildcard-import/bad.py index 2817e2fa84..8d48581612 100644 --- a/doc/data/messages/u/unused-wildcard-import/bad.py +++ b/doc/data/messages/u/unused-wildcard-import/bad.py @@ -1,4 +1,4 @@ from abc import * # [unused-wildcard-import] -class Foo(ABC): ... +class Animal(ABC): ... diff --git a/doc/data/messages/u/unused-wildcard-import/detail.rst b/doc/data/messages/u/unused-wildcard-import/detail.rst new file mode 100644 index 0000000000..2fb15edae2 --- /dev/null +++ b/doc/data/messages/u/unused-wildcard-import/detail.rst @@ -0,0 +1 @@ +Either remove the wildcard import, make use of every object from the wildcard import, or only import the required objects. \ No newline at end of file diff --git a/doc/data/messages/u/unused-wildcard-import/good.py b/doc/data/messages/u/unused-wildcard-import/good.py index 88c7f81d3b..50fc58a741 100644 --- a/doc/data/messages/u/unused-wildcard-import/good.py +++ b/doc/data/messages/u/unused-wildcard-import/good.py @@ -1,7 +1,3 @@ -# Either remove wildcard import, -# make use of every object from the wildcard import, -# or only import the required objects. from abc import ABC - -class Foo(ABC): ... +class Animal(ABC): ... From 9df38e7c4f6b39c4a8b6fbc22245915cc10cc051 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 3 Apr 2022 17:31:01 +0200 Subject: [PATCH 3/4] Update doc/data/messages/u/unused-wildcard-import/good.py --- doc/data/messages/u/unused-wildcard-import/good.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/data/messages/u/unused-wildcard-import/good.py b/doc/data/messages/u/unused-wildcard-import/good.py index 50fc58a741..961af99158 100644 --- a/doc/data/messages/u/unused-wildcard-import/good.py +++ b/doc/data/messages/u/unused-wildcard-import/good.py @@ -1,3 +1,4 @@ from abc import ABC + class Animal(ABC): ... From 1975e0c22e4b4024798f64742ee447921a8392c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 3 Apr 2022 15:31:20 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/data/messages/u/unused-wildcard-import/detail.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/data/messages/u/unused-wildcard-import/detail.rst b/doc/data/messages/u/unused-wildcard-import/detail.rst index 2fb15edae2..64ce4fa8ee 100644 --- a/doc/data/messages/u/unused-wildcard-import/detail.rst +++ b/doc/data/messages/u/unused-wildcard-import/detail.rst @@ -1 +1 @@ -Either remove the wildcard import, make use of every object from the wildcard import, or only import the required objects. \ No newline at end of file +Either remove the wildcard import, make use of every object from the wildcard import, or only import the required objects.