Skip to content

Commit

Permalink
Fix FilesSpec parameters variance issues by making it a Mapping inste…
Browse files Browse the repository at this point in the history
…ad of a dict
  • Loading branch information
Avasam committed Aug 17, 2024
1 parent bb08037 commit 6aef017
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jaraco/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Tools for working with files and file systems
"""

from collections.abc import Mapping
import os
import re
import itertools
Expand All @@ -16,7 +17,7 @@
import ctypes
import importlib
import pathlib
from typing import Dict, Protocol, Union
from typing import Protocol, Union
from typing import runtime_checkable


Expand Down Expand Up @@ -285,7 +286,7 @@ class Symlink(str):
"""


FilesSpec = Dict[str, Union[str, bytes, Symlink, 'FilesSpec']] # type: ignore
FilesSpec = Mapping[str, Union[str, bytes, Symlink, 'FilesSpec']] # type: ignore


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

0 comments on commit 6aef017

Please sign in to comment.