Skip to content

Commit c8eff52

Browse files
committed
Updated prov typeshed
1 parent 10f91c2 commit c8eff52

22 files changed

+137
-566
lines changed

typeshed/2and3/prov/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Stubs for prov (Python 3.5)
1+
# Stubs for prov (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any, Optional
66

77
class Error(Exception): ...
88

9-
def read(source, format: Optional[Any] = ...): ...
9+
def read(source: Any, format: Optional[Any] = ...): ...
1010

1111
# Names in __all__ with no definition:
1212
# model

typeshed/2and3/prov/constants.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.constants (Python 3.5)
1+
# Stubs for prov.constants (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

typeshed/2and3/prov/graph.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.graph (Python 3.5)
1+
# Stubs for prov.graph (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -7,5 +7,5 @@ from typing import Any
77
__email__: str
88
INFERRED_ELEMENT_CLASS: Any
99

10-
def prov_to_graph(prov_document): ...
11-
def graph_to_prov(g): ...
10+
def prov_to_graph(prov_document: Any): ...
11+
def graph_to_prov(g: Any): ...

typeshed/2and3/prov/identifier.pyi

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
# Stubs for prov.identifier (Python 3.5)
1+
# Stubs for prov.identifier (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

5+
from typing import Any
6+
57
__email__: str
68

79
class Identifier:
8-
def __init__(self, uri) -> None: ...
10+
def __init__(self, uri: Any) -> None: ...
911
@property
1012
def uri(self): ...
11-
def __eq__(self, other): ...
13+
def __eq__(self, other: Any): ...
1214
def __hash__(self): ...
1315
def provn_representation(self): ...
1416

1517
class QualifiedName(Identifier):
16-
def __init__(self, namespace, localpart) -> None: ...
18+
def __init__(self, namespace: Any, localpart: Any) -> None: ...
1719
@property
1820
def namespace(self): ...
1921
@property
@@ -22,14 +24,14 @@ class QualifiedName(Identifier):
2224
def provn_representation(self): ...
2325

2426
class Namespace:
25-
def __init__(self, prefix, uri) -> None: ...
27+
def __init__(self, prefix: Any, uri: Any) -> None: ...
2628
@property
2729
def uri(self): ...
2830
@property
2931
def prefix(self): ...
30-
def contains(self, identifier): ...
31-
def qname(self, identifier): ...
32-
def __eq__(self, other): ...
33-
def __ne__(self, other): ...
32+
def contains(self, identifier: Any): ...
33+
def qname(self, identifier: Any): ...
34+
def __eq__(self, other: Any): ...
35+
def __ne__(self, other: Any): ...
3436
def __hash__(self): ...
35-
def __getitem__(self, localpart): ...
37+
def __getitem__(self, localpart: Any): ...

typeshed/2and3/prov/model.pyi

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.serializers (Python 3.5)
1+
# Stubs for prov.serializers (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -8,14 +8,14 @@ from typing import Any, Optional
88
class Serializer:
99
document: Any = ...
1010
def __init__(self, document: Optional[Any] = ...) -> None: ...
11-
def serialize(self, stream, **kwargs): ...
12-
def deserialize(self, stream, **kwargs): ...
11+
def serialize(self, stream: Any, **kwargs: Any) -> None: ...
12+
def deserialize(self, stream: Any, **kwargs: Any) -> None: ...
1313

1414
class DoNotExist(Error): ...
1515

1616
class Registry:
1717
serializers: Any = ...
1818
@staticmethod
19-
def load_serializers(): ...
19+
def load_serializers() -> None: ...
2020

21-
def get(format_name): ...
21+
def get(format_name: Any): ...
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.serializers.provjson (Python 3.5)
1+
# Stubs for prov.serializers.provjson (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -14,25 +14,25 @@ class ProvJSONException(Error): ...
1414

1515
class AnonymousIDGenerator:
1616
def __init__(self) -> None: ...
17-
def get_anon_id(self, obj, local_prefix: str = ...): ...
17+
def get_anon_id(self, obj: Any, local_prefix: str = ...): ...
1818

1919
LITERAL_XSDTYPE_MAP: Any
2020

2121
class ProvJSONSerializer(Serializer):
22-
def serialize(self, stream, **kwargs): ...
23-
def deserialize(self, stream, **kwargs): ...
22+
def serialize(self, stream: Any, **kwargs: Any) -> None: ...
23+
def deserialize(self, stream: Any, **kwargs: Any): ...
2424

2525
class ProvJSONEncoder(json.JSONEncoder):
26-
def default(self, o): ...
26+
def default(self, o: Any): ...
2727

2828
class ProvJSONDecoder(json.JSONDecoder):
29-
def decode(self, s, *args, **kwargs): ...
30-
31-
def valid_qualified_name(bundle, value): ...
32-
def encode_json_document(document): ...
33-
def encode_json_container(bundle): ...
34-
def decode_json_document(content, document): ...
35-
def decode_json_container(jc, bundle): ...
36-
def encode_json_representation(value): ...
37-
def decode_json_representation(literal, bundle): ...
38-
def literal_json_representation(literal): ...
29+
def decode(self, s: Any, *args: Any, **kwargs: Any): ...
30+
31+
def valid_qualified_name(bundle: Any, value: Any): ...
32+
def encode_json_document(document: Any): ...
33+
def encode_json_container(bundle: Any): ...
34+
def decode_json_document(content: Any, document: Any) -> None: ...
35+
def decode_json_container(jc: Any, bundle: Any) -> None: ...
36+
def encode_json_representation(value: Any): ...
37+
def decode_json_representation(literal: Any, bundle: Any): ...
38+
def literal_json_representation(literal: Any): ...
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.serializers.provn (Python 3.5)
1+
# Stubs for prov.serializers.provn (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -9,5 +9,5 @@ __email__: str
99
logger: Any
1010

1111
class ProvNSerializer(Serializer):
12-
def serialize(self, stream, **kwargs): ...
13-
def deserialize(self, stream, **kwargs): ...
12+
def serialize(self, stream: Any, **kwargs: Any) -> None: ...
13+
def deserialize(self, stream: Any, **kwargs: Any) -> None: ...
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.serializers.provrdf (Python 3.5)
1+
# Stubs for prov.serializers.provrdf (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -11,24 +11,24 @@ class ProvRDFException(Error): ...
1111

1212
class AnonymousIDGenerator:
1313
def __init__(self) -> None: ...
14-
def get_anon_id(self, obj, local_prefix: str = ...): ...
14+
def get_anon_id(self, obj: Any, local_prefix: str = ...): ...
1515

1616
LITERAL_XSDTYPE_MAP: Any
1717

18-
def attr2rdf(attr): ...
19-
def valid_qualified_name(bundle, value, xsd_qname: bool = ...): ...
18+
def attr2rdf(attr: Any): ...
19+
def valid_qualified_name(bundle: Any, value: Any, xsd_qname: bool = ...): ...
2020

2121
class ProvRDFSerializer(Serializer):
22-
def serialize(self, stream: Optional[Any] = ..., rdf_format: str = ..., **kwargs): ...
22+
def serialize(self, stream: Optional[Any] = ..., rdf_format: str = ..., **kwargs: Any) -> None: ...
2323
document: Any = ...
24-
def deserialize(self, stream, rdf_format: str = ..., **kwargs): ...
25-
def valid_identifier(self, value): ...
26-
def encode_rdf_representation(self, value): ...
27-
def decode_rdf_representation(self, literal, graph): ...
28-
def encode_document(self, document): ...
29-
def encode_container(self, bundle, container: Optional[Any] = ..., identifier: Optional[Any] = ...): ...
30-
def decode_document(self, content, document): ...
31-
def decode_container(self, graph, bundle): ...
32-
33-
def walk(children, level: int = ..., path: Optional[Any] = ..., usename: bool = ...): ...
34-
def literal_rdf_representation(literal): ...
24+
def deserialize(self, stream: Any, rdf_format: str = ..., **kwargs: Any): ...
25+
def valid_identifier(self, value: Any): ...
26+
def encode_rdf_representation(self, value: Any): ...
27+
def decode_rdf_representation(self, literal: Any, graph: Any): ...
28+
def encode_document(self, document: Any): ...
29+
def encode_container(self, bundle: Any, container: Optional[Any] = ..., identifier: Optional[Any] = ...): ...
30+
def decode_document(self, content: Any, document: Any) -> None: ...
31+
def decode_container(self, graph: Any, bundle: Any) -> None: ...
32+
33+
def walk(children: Any, level: int = ..., path: Optional[Any] = ..., usename: bool = ...): ...
34+
def literal_rdf_representation(literal: Any): ...

typeshed/2and3/prov/serializers/provxml.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stubs for prov.serializers.provxml (Python 3.5)
1+
# Stubs for prov.serializers.provxml (Python 3.6)
22
#
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

@@ -15,9 +15,9 @@ XML_XSD_URI: str
1515
class ProvXMLException(prov.Error): ...
1616

1717
class ProvXMLSerializer(prov.serializers.Serializer):
18-
def serialize(self, stream, force_types: bool = ..., **kwargs): ...
19-
def serialize_bundle(self, bundle, element: Optional[Any] = ..., force_types: bool = ...): ...
20-
def deserialize(self, stream, **kwargs): ...
21-
def deserialize_subtree(self, xml_doc, bundle): ...
18+
def serialize(self, stream: Any, force_types: bool = ..., **kwargs: Any) -> None: ...
19+
def serialize_bundle(self, bundle: Any, element: Optional[Any] = ..., force_types: bool = ...): ...
20+
def deserialize(self, stream: Any, **kwargs: Any): ...
21+
def deserialize_subtree(self, xml_doc: Any, bundle: Any): ...
2222

23-
def xml_qname_to_QualifiedName(element, qname_str): ...
23+
def xml_qname_to_QualifiedName(element: Any, qname_str: Any): ...

0 commit comments

Comments
 (0)