more mypy fixes

This commit is contained in:
joncrall
2022-06-26 17:35:53 -04:00
parent a86cabc716
commit fc0db95198
2 changed files with 3 additions and 3 deletions
+1
View File
@@ -67,6 +67,7 @@ repos:
- types-jinja2
- types-pyyaml
- types-requests
- types-toml
- bracex
- dataclasses
- id: mypy
+2 -3
View File
@@ -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