Skip to content

Commit d58177d

Browse files
authored
[pyxdg] Annotate Incompletes and fix getFiles return annotation (#15028)
1 parent 23c6543 commit d58177d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

stubs/pyxdg/xdg/RecentFiles.pyi

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from _typeshed import Incomplete, StrOrBytesPath, StrPath
1+
from _typeshed import StrOrBytesPath, StrPath
22
from collections.abc import Iterable
33

44
class RecentFiles:
@@ -8,11 +8,9 @@ class RecentFiles:
88
def parse(self, filename: StrPath | None = None) -> None: ...
99
def write(self, filename: StrOrBytesPath | None = None) -> None: ...
1010
def getFiles(
11-
self, mimetypes: Iterable[str] | None = None, groups: Iterable[Incomplete] | None = None, limit: int = 0
12-
) -> list[StrPath]: ...
13-
def addFile(
14-
self, item: StrPath, mimetype: str, groups: Iterable[Incomplete] | None = None, private: bool = False
15-
) -> None: ...
11+
self, mimetypes: Iterable[str] | None = None, groups: Iterable[str] | None = None, limit: int = 0
12+
) -> list[RecentFile]: ...
13+
def addFile(self, item: StrPath, mimetype: str, groups: Iterable[str] | None = None, private: bool = False) -> None: ...
1614
def deleteFile(self, item: RecentFile | StrPath) -> None: ...
1715
def sort(self) -> None: ...
1816

@@ -21,7 +19,7 @@ class RecentFile:
2119
MimeType: str
2220
Timestamp: str
2321
Private: bool
24-
Groups: list[Incomplete]
22+
Groups: list[str]
2523
def __init__(self) -> None: ...
2624
def __cmp__(self, other: RecentFile) -> int: ...
2725
def __lt__(self, other: RecentFile) -> bool: ...

0 commit comments

Comments
 (0)