Skip to content

Commit

Permalink
Update isort version for pre-commit and update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorn-gt committed Sep 17, 2024
1 parent 238f706 commit b944879
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 14 deletions.
1 change: 0 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
line_length=79
multi_line_output=3
include_trailing_comma=true
use_parantheses=True
force_grid_wrap=0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/cfg-paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion doc/examples/show-cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/gtirb/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_block.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_blocks_at.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_blocks_at_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_blocks_on.py
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_blocks_on_offset.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_byte_intervals_at.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import unittest

import gtirb
from helpers import SearchScope, parameterize_one

import gtirb


class ByteIntervalsAtTests(unittest.TestCase):
@parameterize_one(
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_byte_intervals_on.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import unittest

import gtirb
from helpers import SearchScope, parameterize_one

import gtirb


class ByteIntervalsOnTests(unittest.TestCase):
@parameterize_one(
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_symbolic_expression.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/tests/test_symbolic_expressions_at.py
Original file line number Diff line number Diff line change
@@ -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))
Expand Down

0 comments on commit b944879

Please sign in to comment.