Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wildcard imports #310

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion c_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import os
import pprint

from shared_utils import *
from constants import causes, csrs, csrs32
from shared_utils import InstrDict, arg_lut

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
6 changes: 2 additions & 4 deletions chisel_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging
import pprint

from constants import *

# from shared_utils import overlaps, overlap_allowed, extension_overlap_allowed, instruction_overlap_allowed, process_enc_line, same_base_isa, add_segmented_vls_insn, expand_nf_field
from shared_utils import *
from constants import causes, csrs, csrs32
from shared_utils import InstrDict, instr_dict_2_extensions

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
2 changes: 1 addition & 1 deletion go_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pprint
import sys

from shared_utils import *
from shared_utils import InstrDict, signed

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
4 changes: 2 additions & 2 deletions latex_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pprint
from typing import TextIO

from constants import *
from shared_utils import *
from constants import latex_fixed_fields, latex_inst_type, latex_mapping
from shared_utils import InstrDict, arg_lut, create_inst_dict

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
6 changes: 2 additions & 4 deletions rust_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging
import pprint

from constants import *

# from shared_utils import overlaps, overlap_allowed, extension_overlap_allowed, instruction_overlap_allowed, process_enc_line, same_base_isa, add_segmented_vls_insn, expand_nf_field
from shared_utils import *
from constants import causes, csrs, csrs32
from shared_utils import InstrDict

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
10 changes: 9 additions & 1 deletion shared_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
from itertools import chain
from typing import Dict, TypedDict

from constants import *
from constants import (
arg_lut,
fixed_ranges,
imported_regex,
overlapping_extensions,
overlapping_instructions,
pseudo_regex,
single_fixed,
)

LOG_FORMAT = "%(levelname)s:: %(message)s"
LOG_LEVEL = logging.INFO
Expand Down
3 changes: 2 additions & 1 deletion sverilog_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import logging
import pprint

from shared_utils import *
from constants import csrs, csrs32
from shared_utils import InstrDict

pp = pprint.PrettyPrinter(indent=2)
logging.basicConfig(level=logging.INFO, format="%(levelname)s:: %(message)s")
Expand Down
20 changes: 19 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@
import unittest
from unittest.mock import Mock, patch

from shared_utils import *
from shared_utils import (
InstrDict,
check_arg_lut,
check_overlapping_bits,
extract_isa_type,
find_extension_file,
handle_arg_lut_mapping,
initialize_encoding,
is_rv_variant,
overlaps,
pad_to_equal_length,
parse_instruction_line,
process_enc_line,
process_fixed_ranges,
process_standard_instructions,
same_base_isa,
update_encoding_for_fixed_range,
validate_bit_range,
)


class EncodingUtilsTest(unittest.TestCase):
Expand Down
Loading