Skip to content

Commit 649f03b

Browse files
committed
add missing rdflib.paths type hints
1 parent ba9d7e4 commit 649f03b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

mypy-stubs/rdflib/paths.pyi

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from collections.abc import Generator
2+
from typing import Any, Callable, Union
3+
4+
from rdflib.term import Node as Node
5+
from rdflib.term import URIRef as URIRef
6+
7+
ZeroOrMore: str
8+
OneOrMore: str
9+
ZeroOrOne: str
10+
11+
class Path:
12+
__or__: Callable[[Path, Union["URIRef", "Path"]], "AlternativePath"]
13+
__invert__: Callable[[Path], "InvPath"]
14+
__neg__: Callable[[Path], "NegatedPath"]
15+
__truediv__: Callable[[Path, Union["URIRef", "Path"]], "SequencePath"]
16+
__mul__: Callable[[Path, str], "MulPath"]
17+
def __hash__(self) -> int: ...
18+
def __eq__(self, other: Any) -> bool: ...
19+
def __lt__(self, other: Any) -> bool: ...
20+
def __le__(self, other: Any) -> bool: ...
21+
def __ne__(self, other: Any) -> bool: ...
22+
def __gt__(self, other: Any) -> bool: ...
23+
def __ge__(self, other: Any) -> bool: ...
24+
25+
class InvPath(Path): ...
26+
class SequencePath(Path): ...
27+
class AlternativePath(Path): ...
28+
class MulPath(Path): ...
29+
class NegatedPath(Path): ...

0 commit comments

Comments
 (0)