From 6a4dbecc89debb548aeb24d49e2a8a500c03f3e7 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 27 Aug 2019 00:54:49 -0400 Subject: [PATCH 1/1] python: fix all 'imported but unused' warnings Fix all instances of this warning (code F401) found in the repo by flake8. Change-Id: I49dc56715d7f23a8779b7bcaf819ee2c90523a6f Signed-off-by: Simon Marchi Reported-by: flake8 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1979 Tested-by: jenkins --- src/bindings/python/bt2/bt2/component_descriptor.py | 2 +- src/bindings/python/bt2/bt2/event_class.py | 2 -- src/bindings/python/bt2/bt2/mip.py | 2 +- .../python/bt2/bt2/trace_collection_message_iterator.py | 1 - tests/bindings/python/bt2/test_mip.py | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/bindings/python/bt2/bt2/component_descriptor.py b/src/bindings/python/bt2/bt2/component_descriptor.py index f86928d2..3134886b 100644 --- a/src/bindings/python/bt2/bt2/component_descriptor.py +++ b/src/bindings/python/bt2/bt2/component_descriptor.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -from bt2 import native_bt, object, utils +from bt2 import native_bt from bt2 import component as bt2_component import bt2 diff --git a/src/bindings/python/bt2/bt2/event_class.py b/src/bindings/python/bt2/bt2/event_class.py index 8d9d54dc..afa42d03 100644 --- a/src/bindings/python/bt2/bt2/event_class.py +++ b/src/bindings/python/bt2/bt2/event_class.py @@ -23,9 +23,7 @@ from bt2 import native_bt, object, utils from bt2 import field_class as bt2_field_class from bt2 import value as bt2_value -from bt2 import event as bt2_event from bt2 import stream_class as bt2_stream_class -import bt2 class EventClassLogLevel: diff --git a/src/bindings/python/bt2/bt2/mip.py b/src/bindings/python/bt2/bt2/mip.py index 43e1b7b8..92997f17 100644 --- a/src/bindings/python/bt2/bt2/mip.py +++ b/src/bindings/python/bt2/bt2/mip.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -from bt2 import native_bt, object, utils +from bt2 import native_bt, utils import bt2 diff --git a/src/bindings/python/bt2/bt2/trace_collection_message_iterator.py b/src/bindings/python/bt2/bt2/trace_collection_message_iterator.py index d14efe23..74417776 100644 --- a/src/bindings/python/bt2/bt2/trace_collection_message_iterator.py +++ b/src/bindings/python/bt2/bt2/trace_collection_message_iterator.py @@ -24,7 +24,6 @@ from bt2 import utils, native_bt import bt2 import itertools from bt2 import message_iterator as bt2_message_iterator -from bt2 import logging as bt2_logging from bt2 import port as bt2_port from bt2 import component as bt2_component from bt2 import value as bt2_value diff --git a/tests/bindings/python/bt2/test_mip.py b/tests/bindings/python/bt2/test_mip.py index 642539e9..c5a418e1 100644 --- a/tests/bindings/python/bt2/test_mip.py +++ b/tests/bindings/python/bt2/test_mip.py @@ -17,7 +17,6 @@ # import unittest -import copy import bt2 -- 2.34.1