diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-09-08 14:24:39 +0100 |
---|---|---|
committer | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-09-09 17:21:48 +0100 |
commit | f5b293d0927506c2a979a091bf0d07ecc78fa181 (patch) | |
tree | 4de585b7cb6ed34da8237063752270189a730a41 /tests/test_backend_fs.py | |
parent | cde0c6ee140bd108849bff40467d8f18ffc332ef (diff) | |
download | mlia-f5b293d0927506c2a979a091bf0d07ecc78fa181.tar.gz |
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
Diffstat (limited to 'tests/test_backend_fs.py')
-rw-r--r-- | tests/test_backend_fs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_backend_fs.py b/tests/test_backend_fs.py index 7423222..21226a9 100644 --- a/tests/test_backend_fs.py +++ b/tests/test_backend_fs.py @@ -2,10 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 # pylint: disable=no-self-use """Module for testing fs.py.""" +from __future__ import annotations + from contextlib import ExitStack as does_not_raise from pathlib import Path from typing import Any -from typing import Union from unittest.mock import MagicMock import pytest @@ -108,7 +109,7 @@ def test_recreate_directory(tmpdir: Any) -> None: def write_to_file( - write_directory: Any, write_mode: str, write_text: Union[str, bytes] + write_directory: Any, write_mode: str, write_text: str | bytes ) -> Path: """Write some text to a temporary test file.""" tmpdir_path = Path(write_directory) |