From fc0db9519855c158267a55bde9efdc767b0f3e18 Mon Sep 17 00:00:00 2001 From: joncrall Date: Sun, 26 Jun 2022 17:35:53 -0400 Subject: [PATCH] more mypy fixes --- .pre-commit-config.yaml | 1 + unit_test/docker_container_test.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 679254fd..e54c6d3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,6 +67,7 @@ repos: - types-jinja2 - types-pyyaml - types-requests + - types-toml - bracex - dataclasses - id: mypy diff --git a/unit_test/docker_container_test.py b/unit_test/docker_container_test.py index e9629382..c6ac944f 100644 --- a/unit_test/docker_container_test.py +++ b/unit_test/docker_container_test.py @@ -7,7 +7,6 @@ import subprocess import tempfile import textwrap from pathlib import Path, PurePath, PurePosixPath -from typing import Optional import pytest import toml @@ -30,7 +29,7 @@ else: DEFAULT_IMAGE = "" # These globals will be manipulated -temp_test_dir: Optional[tempfile.TemporaryDirectory[str]] = None +temp_test_dir = None using_podman = False @@ -56,7 +55,7 @@ def _cleanup_podman_vfs_tempdir(): if temp_test_dir is not None: # When podman creates special directories, they can't be cleaned up # unless you fake a UID of 0. The package rootlesskit helps with that. - if using_podman: + if using_podman: # type: ignore[unreachable] subprocess.call(["podman", "unshare", "rm", "-rf", temp_test_dir.name]) temp_test_dir = None