diff --git a/python/podio/__init__.py b/python/podio/__init__.py index 80ccce5f0..477247fde 100644 --- a/python/podio/__init__.py +++ b/python/podio/__init__.py @@ -5,7 +5,7 @@ from .podio_config_reader import * # noqa: F403, F401 -import ROOT +import ROOT # pylint: disable=wrong-import-order # Track whether we were able to dynamially load the library that is built by # podio and enable certain features of the bindings only if they are actually diff --git a/python/podio/test_EventStoreRoot.py b/python/podio/test_EventStoreRoot.py index 6016301e0..522e389d7 100644 --- a/python/podio/test_EventStoreRoot.py +++ b/python/podio/test_EventStoreRoot.py @@ -6,8 +6,9 @@ from ROOT import TFile +from test_EventStore import EventStoreBaseTestCaseMixin # pylint: disable=import-error + from podio.EventStore import EventStore -from test_EventStore import EventStoreBaseTestCaseMixin class EventStoreRootTestCase(EventStoreBaseTestCaseMixin, unittest.TestCase): diff --git a/python/podio/test_EventStoreSio.py b/python/podio/test_EventStoreSio.py index e86d25147..c8d19b852 100644 --- a/python/podio/test_EventStoreSio.py +++ b/python/podio/test_EventStoreSio.py @@ -4,9 +4,10 @@ import unittest import os +from test_utils import SKIP_SIO_TESTS # pylint: disable=import-error +from test_EventStore import EventStoreBaseTestCaseMixin # pylint: disable=import-error + from podio.EventStore import EventStore -from test_EventStore import EventStoreBaseTestCaseMixin -from test_utils import SKIP_SIO_TESTS @unittest.skipIf(SKIP_SIO_TESTS, "no SIO support") diff --git a/python/podio/test_Frame.py b/python/podio/test_Frame.py index 1255e3a8d..0dc823d76 100644 --- a/python/podio/test_Frame.py +++ b/python/podio/test_Frame.py @@ -3,12 +3,13 @@ import unittest +# pylint: disable=import-error +from test_utils import ExampleHitCollection # noqa: E402 + from podio.frame import Frame # using root_io as that should always be present regardless of which backends are built from podio.root_io import Reader -from test_utils import ExampleHitCollection # noqa: E402 # pylint: disable=wrong-import-position - # The expected collections in each frame EXPECTED_COLL_NAMES = { diff --git a/python/podio/test_ReaderRoot.py b/python/podio/test_ReaderRoot.py index 2d14a67a4..a7bdf98f8 100644 --- a/python/podio/test_ReaderRoot.py +++ b/python/podio/test_ReaderRoot.py @@ -3,8 +3,9 @@ import unittest +from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin # pylint: disable=import-error + from podio.root_io import Reader, LegacyReader -from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin class RootReaderTestCase(ReaderTestCaseMixin, unittest.TestCase): diff --git a/python/podio/test_ReaderSio.py b/python/podio/test_ReaderSio.py index e0d95da69..ef7b86b6b 100644 --- a/python/podio/test_ReaderSio.py +++ b/python/podio/test_ReaderSio.py @@ -3,8 +3,8 @@ import unittest -from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin -from test_utils import SKIP_SIO_TESTS +from test_Reader import ReaderTestCaseMixin, LegacyReaderTestCaseMixin # pylint: disable=import-error +from test_utils import SKIP_SIO_TESTS # pylint: disable=import-error @unittest.skipIf(SKIP_SIO_TESTS, "no SIO support") diff --git a/tests/root_io/write_frame_root.py b/tests/root_io/write_frame_root.py index e67a0ffea..2609c602a 100644 --- a/tests/root_io/write_frame_root.py +++ b/tests/root_io/write_frame_root.py @@ -6,7 +6,9 @@ sys.path.append(os.path.join(os.environ.get("PODIO_BASE"), "python", "podio")) -import test_utils -from podio.root_io import Writer +import test_utils # pylint: disable=import-error, disable=wrong-import-position + +from podio.root_io import Writer # pylint: disable=wrong-import-position + test_utils.write_file(Writer, "example_frame_with_py.root")