Skip to content

Commit

Permalink
🚨 Fix ruff linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa committed Dec 3, 2024
1 parent 21cc8f2 commit 646aee1
Show file tree
Hide file tree
Showing 76 changed files with 848 additions and 809 deletions.
970 changes: 485 additions & 485 deletions bindings/mnt/pyfiction/__init__.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/mnt/pyfiction/test/algorithms/iter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os.path import dirname, basename, isfile, join
import glob
import os
import sys
from os.path import basename, dirname, isfile, join
from pathlib import Path

if sys.platform == "win32" and "Z3_ROOT" in os.environ:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from mnt.pyfiction import sidb_100_lattice, bdl_input_iterator_100, sidb_technology
import unittest

from mnt.pyfiction import bdl_input_iterator_100, sidb_100_lattice, sidb_technology


class TestBDLInputIterator(unittest.TestCase):
def test_empty_layout(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os.path import dirname, basename, isfile, join
import glob
import os
import sys
from os.path import basename, dirname, isfile, join
from pathlib import Path

if sys.platform == "win32" and "Z3_ROOT" in os.environ:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
is_fanout_substituted,
fanout_substitution,
fanout_substitution_params,
is_fanout_substituted,
read_technology_network,
substitution_strategy,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from mnt.pyfiction import read_technology_network, is_balanced, network_balancing, network_balancing_params
import unittest
import os
import unittest

from mnt.pyfiction import is_balanced, network_balancing, network_balancing_params, read_technology_network

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
technology_mapping,
equivalence_checking,
eq_type,
and_or_not,
and_or_not_maj,
all_standard_2_input_functions,
all_standard_3_input_functions,
all_supported_standard_functions,
and_or_not,
and_or_not_maj,
eq_type,
equivalence_checking,
read_technology_network,
technology_mapping,
technology_mapping_stats,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os.path import dirname, basename, isfile, join
import glob
import os
import sys
from os.path import basename, dirname, isfile, join
from pathlib import Path

if sys.platform == "win32" and "Z3_ROOT" in os.environ:
Expand Down
22 changes: 11 additions & 11 deletions bindings/mnt/pyfiction/test/algorithms/path_finding/test_a_star.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import unittest

from mnt.pyfiction import (
cartesian_layout,
shifted_cartesian_layout,
hexagonal_layout,
a_star,
offset_coordinate,
clocked_cartesian_layout,
a_star_distance,
a_star_params,
cartesian_gate_layout,
shifted_cartesian_gate_layout,
cartesian_layout,
cartesian_obstruction_layout,
clocked_cartesian_layout,
clocked_hexagonal_layout,
clocked_shifted_cartesian_layout,
hexagonal_gate_layout,
clocked_hexagonal_layout,
cartesian_obstruction_layout,
shifted_cartesian_obstruction_layout,
hexagonal_layout,
hexagonal_obstruction_layout,
a_star_params,
a_star_distance,
offset_coordinate,
shifted_cartesian_gate_layout,
shifted_cartesian_layout,
shifted_cartesian_obstruction_layout,
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import unittest

from mnt.pyfiction import (
cartesian_gate_layout,
cartesian_layout,
chebyshev_distance,
clocked_cartesian_layout,
shifted_cartesian_layout,
cartesian_gate_layout,
clocked_shifted_cartesian_layout,
shifted_cartesian_gate_layout,
hexagonal_layout,
clocked_hexagonal_layout,
clocked_shifted_cartesian_layout,
euclidean_distance,
hexagonal_gate_layout,
offset_coordinate,
hexagonal_layout,
manhattan_distance,
euclidean_distance,
offset_coordinate,
shifted_cartesian_gate_layout,
shifted_cartesian_layout,
squared_euclidean_distance,
twoddwave_distance,
chebyshev_distance,
)
import unittest


class TestDistance(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import unittest

from mnt.pyfiction import (
cartesian_gate_layout,
cartesian_layout,
shifted_cartesian_layout,
hexagonal_layout,
enumerate_all_paths,
offset_coordinate,
clocked_cartesian_layout,
cartesian_gate_layout,
clocked_shifted_cartesian_layout,
shifted_cartesian_gate_layout,
clocked_hexagonal_layout,
clocked_shifted_cartesian_layout,
enumerate_all_paths,
hexagonal_gate_layout,
hexagonal_layout,
offset_coordinate,
shifted_cartesian_gate_layout,
shifted_cartesian_layout,
)
import unittest


class TestEnumerateAllPaths(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import unittest

from mnt.pyfiction import (
cartesian_gate_layout,
cartesian_layout,
shifted_cartesian_layout,
hexagonal_layout,
yen_k_shortest_paths,
offset_coordinate,
clocked_cartesian_layout,
cartesian_gate_layout,
clocked_shifted_cartesian_layout,
shifted_cartesian_gate_layout,
clocked_hexagonal_layout,
clocked_shifted_cartesian_layout,
hexagonal_gate_layout,
hexagonal_layout,
offset_coordinate,
shifted_cartesian_gate_layout,
shifted_cartesian_layout,
yen_k_shortest_paths,
)
import unittest


class TestKShortestPaths(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os.path import dirname, basename, isfile, join
import glob
import os
import sys
from os.path import basename, dirname, isfile, join
from pathlib import Path

if sys.platform == "win32" and "Z3_ROOT" in os.environ:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
orthogonal,
apply_bestagon_library,
apply_qca_one_library,
exact_params,
apply_topolinano_library,
exact_hexagonal,
apply_bestagon_library,
technology_constraints,
exact_params,
exact_shifted_cartesian,
apply_topolinano_library,
orthogonal,
read_technology_network,
technology_constraints,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from mnt.pyfiction import (
cartesian_gate_layout,
hexagonal_gate_layout,
offset_coordinate,
color_routing,
color_routing_params,
hexagonal_gate_layout,
offset_coordinate,
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import unittest

from mnt.pyfiction import (
sidb_100_lattice,
sidb_technology,
design_sidb_gates_params,
design_sidb_gates_mode,
sidb_simulation_engine,
design_sidb_gates,
create_and_tt,
sidb_111_lattice,
operational_condition,
create_nor_tt,
design_sidb_gates,
design_sidb_gates_mode,
design_sidb_gates_params,
operational_condition,
sidb_100_lattice,
sidb_111_lattice,
sidb_simulation_engine,
sidb_technology,
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
exact_cartesian,
equivalence_checking,
eq_type,
equivalence_checking,
exact_cartesian,
exact_hexagonal,
exact_params,
exact_stats,
exact_hexagonal,
read_technology_network,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
graph_oriented_layout_design_stats,
graph_oriented_layout_design,
graph_oriented_layout_design_params,
eq_type,
equivalence_checking,
gold_cost_objective,
gold_effort_mode,
graph_oriented_layout_design,
graph_oriented_layout_design_params,
graph_oriented_layout_design_stats,
read_technology_network,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from mnt.pyfiction import read_technology_network, orthogonal, equivalence_checking, hexagonalization, eq_type
import unittest
import os
import unittest

from mnt.pyfiction import eq_type, equivalence_checking, hexagonalization, orthogonal, read_technology_network

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
orthogonal,
equivalence_checking,
eq_type,
orthogonal_stats,
equivalence_checking,
orthogonal,
orthogonal_params,
orthogonal_stats,
read_technology_network,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
import unittest

from mnt.pyfiction import (
read_technology_network,
orthogonal,
equivalence_checking,
eq_type,
equivalence_checking,
orthogonal,
post_layout_optimization,
post_layout_optimization_params,
post_layout_optimization_stats,
read_technology_network,
)
import unittest
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

Expand Down
Loading

0 comments on commit 646aee1

Please sign in to comment.