[PATCH v2 4/8] dts: remove module-wide imports

Juraj Linkeš juraj.linkes at pantheon.tech
Thu Jun 6 15:21:19 CEST 2024



On 9. 5. 2024 13:20, Luca Vizzarro wrote:
> Remove the imports in the testbed_model and remote_session modules init
> file, to avoid the initialisation of unneeded modules, thus removing or
> limiting the risk of circular dependencies.
> 
> Signed-off-by: Luca Vizzarro <luca.vizzarro at arm.com>
> Reviewed-by: Paul Szczepanek <paul.szczepanek at arm.com>
> ---
>   dts/framework/remote_session/__init__.py               | 5 +----
>   dts/framework/runner.py                                | 4 +++-
>   dts/framework/test_suite.py                            | 5 ++++-
>   dts/framework/testbed_model/__init__.py                | 7 -------
>   dts/framework/testbed_model/os_session.py              | 4 ++--
>   dts/framework/testbed_model/sut_node.py                | 2 +-
>   dts/framework/testbed_model/traffic_generator/scapy.py | 2 +-
>   dts/tests/TestSuite_hello_world.py                     | 2 +-
>   dts/tests/TestSuite_smoke_tests.py                     | 2 +-
>   9 files changed, 14 insertions(+), 19 deletions(-)
> 

> diff --git a/dts/framework/testbed_model/__init__.py b/dts/framework/testbed_model/__init__.py
> index 6086512ca2..4f8a58c039 100644
> --- a/dts/framework/testbed_model/__init__.py
> +++ b/dts/framework/testbed_model/__init__.py
> @@ -19,10 +19,3 @@
>   """
>   
>   # pylama:ignore=W0611

There's no reason to leave this in now. It may not be needed in 
dts/framework/remote_session/__init__.py as well.

> -
> -from .cpu import LogicalCoreCount, LogicalCoreCountFilter, LogicalCoreList
> -from .node import Node
> -from .port import Port, PortLink
> -from .sut_node import SutNode
> -from .tg_node import TGNode
> -from .virtual_device import VirtualDevice


More information about the dev mailing list