From: Robin Ole Heinemann Date: Tue, 18 May 2021 18:39:57 +0000 (+0200) Subject: *: remove unused imports X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7193d9a888bb7bb4b2dbd764f2cfb8354d08ef21;p=nmigen.git *: remove unused imports --- diff --git a/examples/basic/ctr_en.py b/examples/basic/ctr_en.py index d5e3279..ba63737 100644 --- a/examples/basic/ctr_en.py +++ b/examples/basic/ctr_en.py @@ -1,6 +1,6 @@ from nmigen import * from nmigen.sim import * -from nmigen.back import rtlil, verilog +from nmigen.back import verilog class Counter(Elaboratable): diff --git a/nmigen/_utils.py b/nmigen/_utils.py index 6168ea1..d04d720 100644 --- a/nmigen/_utils.py +++ b/nmigen/_utils.py @@ -5,7 +5,6 @@ import linecache import re from collections import OrderedDict from collections.abc import Iterable -from contextlib import contextmanager from .utils import * diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 4606f43..2198639 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -1,10 +1,9 @@ import io -import textwrap -from collections import defaultdict, OrderedDict +from collections import OrderedDict from contextlib import contextmanager from .._utils import bits_for, flatten -from ..hdl import ast, rec, ir, mem, xfrm +from ..hdl import ast, ir, mem, xfrm __all__ = ["convert", "convert_fragment"] diff --git a/nmigen/compat/genlib/roundrobin.py b/nmigen/compat/genlib/roundrobin.py index 4c9f4a0..3333900 100644 --- a/nmigen/compat/genlib/roundrobin.py +++ b/nmigen/compat/genlib/roundrobin.py @@ -1,7 +1,6 @@ import warnings from ..fhdl.structure import Signal, If, Case -from ..._utils import deprecated from ..fhdl.module import CompatModule diff --git a/nmigen/hdl/ast.py b/nmigen/hdl/ast.py index 0356e7d..1ccc446 100644 --- a/nmigen/hdl/ast.py +++ b/nmigen/hdl/ast.py @@ -1,8 +1,5 @@ from abc import ABCMeta, abstractmethod -import traceback -import sys import warnings -import typing import functools from collections import OrderedDict from collections.abc import Iterable, MutableMapping, MutableSet, MutableSequence diff --git a/nmigen/hdl/dsl.py b/nmigen/hdl/dsl.py index 829cd2f..564d8b8 100644 --- a/nmigen/hdl/dsl.py +++ b/nmigen/hdl/dsl.py @@ -1,11 +1,10 @@ -from collections import OrderedDict, namedtuple -from collections.abc import Iterable +from collections import OrderedDict from contextlib import contextmanager, _GeneratorContextManager from functools import wraps from enum import Enum import warnings -from .._utils import flatten, bits_for, deprecated +from .._utils import flatten, bits_for from .. import tracer from .ast import * from .ir import * diff --git a/nmigen/hdl/ir.py b/nmigen/hdl/ir.py index 93129fd..3c1ec60 100644 --- a/nmigen/hdl/ir.py +++ b/nmigen/hdl/ir.py @@ -1,9 +1,7 @@ -from abc import ABCMeta, abstractmethod +from abc import ABCMeta from collections import defaultdict, OrderedDict from functools import reduce import warnings -import traceback -import sys from .._utils import * from .._unused import * diff --git a/nmigen/hdl/rec.py b/nmigen/hdl/rec.py index b5cd0f7..2e6ebd6 100644 --- a/nmigen/hdl/rec.py +++ b/nmigen/hdl/rec.py @@ -3,7 +3,7 @@ from collections import OrderedDict from functools import reduce, wraps from .. import tracer -from .._utils import union, deprecated +from .._utils import union from .ast import * diff --git a/nmigen/hdl/xfrm.py b/nmigen/hdl/xfrm.py index 6e0c209..97f8c53 100644 --- a/nmigen/hdl/xfrm.py +++ b/nmigen/hdl/xfrm.py @@ -2,7 +2,7 @@ from abc import ABCMeta, abstractmethod from collections import OrderedDict from collections.abc import Iterable -from .._utils import flatten, deprecated +from .._utils import flatten from .. import tracer from .ast import * from .ast import _StatementList diff --git a/nmigen/lib/cdc.py b/nmigen/lib/cdc.py index 2fe63ef..a3f35f3 100644 --- a/nmigen/lib/cdc.py +++ b/nmigen/lib/cdc.py @@ -1,4 +1,3 @@ -from .._utils import deprecated from .. import * diff --git a/nmigen/lib/fifo.py b/nmigen/lib/fifo.py index 0cab225..de12a3c 100644 --- a/nmigen/lib/fifo.py +++ b/nmigen/lib/fifo.py @@ -2,7 +2,7 @@ from .. import * from ..asserts import * -from .._utils import log2_int, deprecated +from .._utils import log2_int from .coding import GrayEncoder, GrayDecoder from .cdc import FFSynchronizer, AsyncFFSynchronizer diff --git a/nmigen/sim/_pyclock.py b/nmigen/sim/_pyclock.py index b360802..ca74fb3 100644 --- a/nmigen/sim/_pyclock.py +++ b/nmigen/sim/_pyclock.py @@ -1,5 +1,3 @@ -import inspect - from ._base import BaseProcess diff --git a/nmigen/test/utils.py b/nmigen/test/utils.py index 556b601..681243c 100644 --- a/nmigen/test/utils.py +++ b/nmigen/test/utils.py @@ -6,7 +6,6 @@ import textwrap import traceback import unittest import warnings -from contextlib import contextmanager from ..hdl.ast import * from ..hdl.ir import * diff --git a/tests/compat/test_fsm.py b/tests/compat/test_fsm.py index 8fbf47b..061dc3e 100644 --- a/tests/compat/test_fsm.py +++ b/tests/compat/test_fsm.py @@ -1,5 +1,4 @@ import unittest -from itertools import count from nmigen.compat import * from nmigen.compat.genlib.fsm import FSM diff --git a/tests/test_sim.py b/tests/test_sim.py index bb3906c..ab31bd6 100644 --- a/tests/test_sim.py +++ b/tests/test_sim.py @@ -1,7 +1,7 @@ import os from contextlib import contextmanager -from nmigen._utils import flatten, union +from nmigen._utils import flatten from nmigen.hdl.ast import * from nmigen.hdl.cd import * from nmigen.hdl.mem import * diff --git a/tests/utils.py b/tests/utils.py index 0df4cab..6355001 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -5,7 +5,6 @@ import subprocess import textwrap import traceback import unittest -from contextlib import contextmanager from nmigen.hdl.ast import * from nmigen.hdl.ir import *