Skip to content

Commit ad05e61

Browse files
committed
minor changes in rdflib stub files to make them compatible with mypy in py3 mode
and move to typshed/2and3/ directory
1 parent 65e583c commit ad05e61

File tree

15 files changed

+13
-13
lines changed

15 files changed

+13
-13
lines changed
File renamed without changes.
File renamed without changes.

typeshed/2.7/rdflib/graph.pyi renamed to typeshed/2and3/rdflib/graph.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5-
from typing import Any, AnyStr, Dict, Union, IO, Tuple, Iterator
6-
from StringIO import StringIO as BytesIO
5+
from typing import Any, AnyStr, Dict, Union, IO, Tuple, Iterator, Text
6+
from io import StringIO as BytesIO
77
from rdflib.term import Node, URIRef
88
from rdflib.store import Store
99
from rdflib.namespace import NamespaceManager
@@ -71,8 +71,8 @@ class Graph(Node):
7171
def absolutize(self, uri, defrag=1): ...
7272
def serialize(self, destination: Union[str, IO[Any]]=None, format: str='', base: str=None, encoding: str=None, **args) -> Union[bytes, None]: ...
7373
def parse(self, source: str = None, publicID: str = None,
74-
format: Union[str, unicode] = None,
75-
location: Union[str, unicode] = None, file: IO[Any] = None,
74+
format: Text = None,
75+
location: Text = None, file: IO[Any] = None,
7676
data: str = None, **args): ...
7777
def load(self, source, publicID=None, format=''): ...
7878
def query(self, query_object, processor: str = '', result: str = '', initNs: Dict = None, initBindings: Dict = None, use_store_provided: bool = True, **kwargs) -> Result: ...

typeshed/2.7/rdflib/namespace.pyi renamed to typeshed/2and3/rdflib/namespace.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5-
from typing import Any, Tuple, Union
5+
from typing import Any, Tuple, Union, Text
66

7-
class Namespace(unicode):
7+
class Namespace(Text):
88
__doc__ = ... # type: Any
99
def __new__(cls, value): ...
1010
@property
@@ -13,7 +13,7 @@ class Namespace(unicode):
1313
def __getitem__(self, key, default=None): ...
1414
def __getattr__(self, name): ...
1515

16-
class URIPattern(unicode):
16+
class URIPattern(Text):
1717
__doc__ = ... # type: Any
1818
def __new__(cls, value): ...
1919
def __mod__(self, *args, **kwargs): ...
@@ -57,4 +57,4 @@ def is_ncname(name): ...
5757

5858
XMLNS = ... # type: Any
5959

60-
def split_uri(uri: Union[str, unicode]) -> Tuple[str, str]: ...
60+
def split_uri(uri: Text) -> Tuple[str, str]: ...

typeshed/2.7/rdflib/parser.pyi renamed to typeshed/2and3/rdflib/parser.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6-
from StringIO import StringIO as BytesIO
6+
from io import StringIO as BytesIO
77

88
class Parser:
99
def __init__(self): ...
File renamed without changes.

typeshed/2.7/rdflib/query.pyi renamed to typeshed/2and3/rdflib/query.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6-
from StringIO import StringIO as BytesIO
6+
from io import StringIO as BytesIO
77
import collections
88

99
class Processor:

typeshed/2.7/rdflib/store.pyi renamed to typeshed/2and3/rdflib/store.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing import Any
66
from rdflib.events import Event
7-
from cStringIO import StringIO as BytesIO
7+
from io import StringIO as BytesIO
88

99
class StoreCreatedEvent(Event): ...
1010
class TripleAddedEvent(Event): ...

typeshed/2.7/rdflib/term.pyi renamed to typeshed/2and3/rdflib/term.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5-
from typing import Any
5+
from typing import Any, Text
66

77
class Node: ...
88

9-
class Identifier(Node, unicode):
9+
class Identifier(Node, Text):
1010
def __new__(cls, value): ...
1111
def eq(self, other): ...
1212
def neq(self, other): ...
File renamed without changes.

0 commit comments

Comments
 (0)