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 --- tests/utils/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/utils/common.py') diff --git a/tests/utils/common.py b/tests/utils/common.py index 932343e..616a407 100644 --- a/tests/utils/common.py +++ b/tests/utils/common.py @@ -1,13 +1,13 @@ # SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """Common test utils module.""" -from typing import Tuple +from __future__ import annotations import numpy as np import tensorflow as tf -def get_dataset() -> Tuple[np.ndarray, np.ndarray]: +def get_dataset() -> tuple[np.ndarray, np.ndarray]: """Return sample dataset.""" mnist = tf.keras.datasets.mnist (x_train, y_train), _ = mnist.load_data() -- cgit v1.2.1