aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/libregrtest/utils.py
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-09-14 19:33:18 +0100
committerGitHub <noreply@github.com>2023-09-14 18:33:18 +0000
commit3b9d10b0316cdc2679ccad80563b7c7da3951388 (patch)
treebb174dbb8d5582380991fd0d5f8633a7923a89d1 /Lib/test/libregrtest/utils.py
parent21e80f4c1925aaafae199840f8737b5c39a82c70 (diff)
downloadcpython-3b9d10b0316cdc2679ccad80563b7c7da3951388.tar.gz
cpython-3b9d10b0316cdc2679ccad80563b7c7da3951388.zip
gh-109413: libregrtest: Add and improve type annotations (#109405)
Diffstat (limited to 'Lib/test/libregrtest/utils.py')
-rw-r--r--Lib/test/libregrtest/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py
index 880cec5cc50..2f3bc3c6019 100644
--- a/Lib/test/libregrtest/utils.py
+++ b/Lib/test/libregrtest/utils.py
@@ -10,6 +10,7 @@ import sys
import sysconfig
import tempfile
import textwrap
+from collections.abc import Callable
from test import support
from test.support import os_helper
@@ -67,7 +68,7 @@ def format_duration(seconds):
return ' '.join(parts)
-def strip_py_suffix(names: list[str]):
+def strip_py_suffix(names: list[str] | None) -> None:
if not names:
return
for idx, name in enumerate(names):
@@ -441,6 +442,7 @@ def remove_testfn(test_name: TestName, verbose: int) -> None:
if not os.path.exists(name):
return
+ nuker: Callable[[str], None]
if os.path.isdir(name):
import shutil
kind, nuker = "directory", shutil.rmtree