From f5b293d0927506c2a979a091bf0d07ecc78fa181 Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Thu, 8 Sep 2022 14:24:39 +0100 Subject: MLIA-386 Simplify typing in the source code - Enable deferred annotations evaluation - Use builtin types for type hints whenever possible - Use | syntax for union types - Rename mlia.core._typing into mlia.core.typing Change-Id: I3f6ffc02fa069c589bdd9e8bddbccd504285427a --- src/mlia/cli/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mlia/cli/config.py') diff --git a/src/mlia/cli/config.py b/src/mlia/cli/config.py index a673230..dc28fa2 100644 --- a/src/mlia/cli/config.py +++ b/src/mlia/cli/config.py @@ -1,9 +1,10 @@ # SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """Environment configuration functions.""" +from __future__ import annotations + import logging from functools import lru_cache -from typing import List import mlia.backend.manager as backend_manager from mlia.tools.metadata.common import DefaultInstallationManager @@ -21,7 +22,7 @@ def get_installation_manager(noninteractive: bool = False) -> InstallationManage @lru_cache -def get_available_backends() -> List[str]: +def get_available_backends() -> list[str]: """Return list of the available backends.""" available_backends = ["Vela"] @@ -42,7 +43,7 @@ def get_available_backends() -> List[str]: _CORSTONE_EXCLUSIVE_PRIORITY = ("Corstone-310", "Corstone-300") -def get_default_backends() -> List[str]: +def get_default_backends() -> list[str]: """Get default backends for evaluation.""" backends = get_available_backends() -- cgit v1.2.1