Skip to content

Commit

Permalink
Merge pull request #3 from Avasam/FileSpec-variance
Browse files Browse the repository at this point in the history
Fix FilesSpec parameters variance issues by making it a Mapping instead of a dict
  • Loading branch information
jaraco authored Aug 29, 2024
2 parents ba562cc + 5cf91d5 commit 3d34edc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaraco/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import ctypes
import importlib
import pathlib
from typing import TYPE_CHECKING, Dict, Protocol, Union, runtime_checkable
from typing import TYPE_CHECKING, Mapping, Protocol, Union, runtime_checkable

if TYPE_CHECKING:
from typing_extensions import Self
Expand Down Expand Up @@ -288,7 +288,7 @@ class Symlink(str):
"""


FilesSpec = Dict[str, Union[str, bytes, Symlink, 'FilesSpec']]
FilesSpec = Mapping[str, Union[str, bytes, Symlink, 'FilesSpec']]


@runtime_checkable
Expand Down
1 change: 1 addition & 0 deletions newsfragments/3.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``FilesSpec`` parameters variance issues by making it a `typing.Mapping` instead of a `dict` -- by :user:`Avasam`

0 comments on commit 3d34edc

Please sign in to comment.