From eb719321daa5a43e808007bc6b6f1fce08529169 Mon Sep 17 00:00:00 2001 From: Avasam Date: Thu, 22 Aug 2024 15:58:54 -0400 Subject: [PATCH] Fix FilesSpec parameters variance issues by making it a Mapping instead of a dict --- jaraco/path.py | 5 ++--- newsfragments/3.bugfix.rst | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 newsfragments/3.bugfix.rst diff --git a/jaraco/path.py b/jaraco/path.py index c49a842..2a1332f 100644 --- a/jaraco/path.py +++ b/jaraco/path.py @@ -16,8 +16,7 @@ import ctypes import importlib import pathlib -from typing import Dict, Protocol, Union -from typing import runtime_checkable +from typing import Mapping, Protocol, Union, runtime_checkable log = logging.getLogger(__name__) @@ -285,7 +284,7 @@ class Symlink(str): """ -FilesSpec = Dict[str, Union[str, bytes, Symlink, 'FilesSpec']] +FilesSpec = Mapping[str, Union[str, bytes, Symlink, 'FilesSpec']] @runtime_checkable diff --git a/newsfragments/3.bugfix.rst b/newsfragments/3.bugfix.rst new file mode 100644 index 0000000..f059d9e --- /dev/null +++ b/newsfragments/3.bugfix.rst @@ -0,0 +1 @@ +Fix ``FilesSpec`` parameters variance issues by making it a `typing.Mapping` instead of a `dict` -- by :user:`Avasam`