Skip to content

Commit d8f3540

Browse files
committed
bugfix: make glob signature compatible
1 parent 5c47676 commit d8f3540

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/smb_path/smb_path.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from io import TextIOWrapper
44
from os import stat_result
55
from pathlib import Path, PosixPath, PurePath, WindowsPath
6-
from typing import Tuple, Union
6+
from typing import Any, Optional, Tuple, Union
77

88
import smbclient
99
import smbprotocol.exceptions as smb_exceptions
@@ -117,9 +117,13 @@ def hardlink_to(self, *args, **kwargs):
117117
msg = "Function not implemented for SmbPath"
118118
raise NotImplementedError(msg)
119119

120-
def glob(self, pattern: str):
120+
def glob(self, pattern: str, *, case_sensitive: Optional[Any] = None): # noqa ARG002
121121
"""Iterate over this subtree and yield all existing files (of any
122-
kind, including directories) matching the given relative pattern."""
122+
kind, including directories) matching the given relative pattern.
123+
124+
:param pattern: The pattern to match
125+
:param case_sensitive: Has no effect, present for signature compatibility
126+
"""
123127

124128
def _recursive_glob(path: SmbPath, parts: Tuple[str, ...]) -> Generator:
125129
if not parts:

0 commit comments

Comments
 (0)