diff --git a/.isort.cfg b/.isort.cfg index f121cc6b..a7e45961 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -6,5 +6,4 @@ line_length=79 multi_line_output=3 include_trailing_comma=true -use_parantheses=True force_grid_wrap=0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12ab7436..065467ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - id: cmake-format exclude: build - repo: https://github.com/timothycrosley/isort - rev: 4.3.19 + rev: 5.13.2 hooks: - id: isort files: \.py$ diff --git a/doc/examples/cfg-paths.py b/doc/examples/cfg-paths.py index a3b246e2..5c6fcbc8 100755 --- a/doc/examples/cfg-paths.py +++ b/doc/examples/cfg-paths.py @@ -18,9 +18,10 @@ # $ ./doc/examples/cfg-paths.py /tmp/hello.gtirb import sys -import gtirb import networkx as nx +import gtirb + if len(sys.argv) < 4: print(f"Usage: {sys.argv[0]} /path/to/file.gtirb source target") quit(1) diff --git a/doc/examples/show-cfg.py b/doc/examples/show-cfg.py index fd7bdbcf..b9cb651e 100755 --- a/doc/examples/show-cfg.py +++ b/doc/examples/show-cfg.py @@ -17,10 +17,11 @@ # $ ./doc/examples/show-cfg.py /tmp/hello.gtirb import sys -import gtirb import matplotlib.pyplot as plt import networkx as nx +import gtirb + if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} /path/to/file.gtirb") quit(1) diff --git a/python/gtirb/module.py b/python/gtirb/module.py index 36742ed3..2e35529d 100644 --- a/python/gtirb/module.py +++ b/python/gtirb/module.py @@ -22,8 +22,8 @@ if typing.TYPE_CHECKING: # pragma: no cover # Ignore flake8 "imported but unused" errors. - from .ir import IR # noqa: F401 from .block import Block # noqa: F401 + from .ir import IR # noqa: F401 _T = typing.TypeVar("_T", bound=typing.Union[ProxyBlock, Section, Symbol]) diff --git a/python/tests/test_block.py b/python/tests/test_block.py index c26dab58..07ddde27 100644 --- a/python/tests/test_block.py +++ b/python/tests/test_block.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import create_interval_etc +import gtirb + class BlockTest(unittest.TestCase): def test_contains_offset(self): diff --git a/python/tests/test_blocks_at.py b/python/tests/test_blocks_at.py index 4e766ff6..b5f7a158 100644 --- a/python/tests/test_blocks_at.py +++ b/python/tests/test_blocks_at.py @@ -2,9 +2,10 @@ import unittest -import gtirb from helpers import SearchScope, create_interval_etc, parameterize_one +import gtirb + class BlocksAtTests(unittest.TestCase): @parameterize_one("scope", list(SearchScope)) diff --git a/python/tests/test_blocks_at_offset.py b/python/tests/test_blocks_at_offset.py index f94b8eda..39ee53f8 100644 --- a/python/tests/test_blocks_at_offset.py +++ b/python/tests/test_blocks_at_offset.py @@ -2,9 +2,10 @@ import unittest -import gtirb from helpers import create_interval_etc +import gtirb + class BlocksAtOffsetTests(unittest.TestCase): def test_blocks_at_offset_simple(self): diff --git a/python/tests/test_blocks_on.py b/python/tests/test_blocks_on.py index f9c122f1..ad74c40b 100644 --- a/python/tests/test_blocks_on.py +++ b/python/tests/test_blocks_on.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import SearchScope, create_interval_etc, parameterize_one +import gtirb + class BlocksOnTests(unittest.TestCase): @parameterize_one("scope", list(SearchScope)) diff --git a/python/tests/test_blocks_on_offset.py b/python/tests/test_blocks_on_offset.py index 463f2bd9..301e7ade 100644 --- a/python/tests/test_blocks_on_offset.py +++ b/python/tests/test_blocks_on_offset.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import create_interval_etc +import gtirb + class BlocksOnOffsetTests(unittest.TestCase): def test_blocks_on_offset_simple(self): diff --git a/python/tests/test_byte_intervals_at.py b/python/tests/test_byte_intervals_at.py index ddf6fe98..fa8b89f8 100644 --- a/python/tests/test_byte_intervals_at.py +++ b/python/tests/test_byte_intervals_at.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import SearchScope, parameterize_one +import gtirb + class ByteIntervalsAtTests(unittest.TestCase): @parameterize_one( diff --git a/python/tests/test_byte_intervals_on.py b/python/tests/test_byte_intervals_on.py index f4629bd2..ef17a9fe 100644 --- a/python/tests/test_byte_intervals_on.py +++ b/python/tests/test_byte_intervals_on.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import SearchScope, parameterize_one +import gtirb + class ByteIntervalsOnTests(unittest.TestCase): @parameterize_one( diff --git a/python/tests/test_symbolic_expression.py b/python/tests/test_symbolic_expression.py index f56f2d01..b4d2953a 100644 --- a/python/tests/test_symbolic_expression.py +++ b/python/tests/test_symbolic_expression.py @@ -1,9 +1,10 @@ import io import unittest -import gtirb from helpers import create_interval_etc +import gtirb + class SymbolicExpressionAttributes(unittest.TestCase): def test_unknown_attributes(self): diff --git a/python/tests/test_symbolic_expressions_at.py b/python/tests/test_symbolic_expressions_at.py index e3eee1c7..3ff30e26 100644 --- a/python/tests/test_symbolic_expressions_at.py +++ b/python/tests/test_symbolic_expressions_at.py @@ -1,8 +1,9 @@ import unittest -import gtirb from helpers import SearchScope, create_interval_etc, parameterize_one +import gtirb + class SymbolicExpressionsAtTests(unittest.TestCase): @parameterize_one("scope", list(SearchScope))