Skip to content

Commit

Permalink
pylint: Fix pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 15, 2023
1 parent 0c39a57 commit 7ef2afe
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion python/podio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion python/podio/test_EventStoreRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions python/podio/test_EventStoreSio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions python/podio/test_Frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion python/podio/test_ReaderRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions python/podio/test_ReaderSio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions tests/root_io/write_frame_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 7ef2afe

Please sign in to comment.