Skip to content

Commit b8ba072

Browse files
committed
update types
1 parent 7008d94 commit b8ba072

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

schema_salad/jsonld_context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ def fix_jsonld_ids(obj, ids):
189189
fix_jsonld_ids(entry, ids)
190190

191191
def makerdf(workflow, wf, ctx, graph=None):
192-
# type: (Union[str, unicode], Union[List[Dict[unicode, Any]], Dict[unicode, Any]], Loader.ContextType) -> Graph
192+
# type: (Union[str, unicode], Union[List[Dict[unicode, Any]], Dict[unicode, Any]], Loader.ContextType, Graph) -> Graph
193193
prefixes = {}
194194
idfields = []
195-
for k,v in ctx.iteritems():
195+
for k, v in ctx.iteritems():
196196
if isinstance(v, dict):
197197
url = v["@id"]
198198
else:
@@ -220,10 +220,10 @@ def makerdf(workflow, wf, ctx, graph=None):
220220
g.parse(data=json.dumps(wf), format='json-ld', location=workflow)
221221

222222
# Bug in json-ld loader causes @id fields to be added to the graph
223-
for s,p,o in g.triples((None, URIRef("@id"), None)):
223+
for s, p, o in g.triples((None, URIRef("@id"), None)):
224224
g.remove((s, p, o))
225225

226-
for k2,v2 in prefixes.iteritems():
226+
for k2, v2 in prefixes.iteritems():
227227
g.namespace_manager.bind(k2, v2)
228228

229229
return g

typeshed/2.7/rdflib/graph.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Graph(Node):
2525
def close(self, commit_pending_transaction=False): ...
2626
def add(self, __tuple_arg_2: Tuple[Node, Node, Node]) -> None: ...
2727
def addN(self, quads): ...
28-
def remove(self, __tuple_arg_2): ...
28+
def remove(self, __tuple_arg_2: Tuple[Union[AnyStr, URIRef], AnyStr, Union[AnyStr, URIRef]]) -> None: ...
2929
def triples(self, __tuple_arg_2: Tuple[Union[AnyStr, URIRef], AnyStr, Union[AnyStr, URIRef]]) -> Iterator[Tuple[AnyStr, AnyStr, AnyStr]]: ...
3030
def __getitem__(self, item): ...
3131
def __len__(self): ...

0 commit comments

Comments
 (0)