summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIwan Aucamp <aucampia@gmail.com>2021-12-01 06:45:14 +0100
committerIwan Aucamp <aucampia@gmail.com>2021-12-01 06:45:14 +0100
commitd7782352c48cb57dd748410648186078b61d00a2 (patch)
tree69abb4d2b486566eed19a449bb42c28900210a93
parent4c0b35caab020b96cd7f6fa914614f5961e0275c (diff)
downloadrdflib-d7782352c48cb57dd748410648186078b61d00a2.tar.gz
Fix typing of create_input_source
Change the type of `data` parameter to also allow values of `Dict` type as these are used with `PythonInputSource`.
-rw-r--r--rdflib/parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rdflib/parser.py b/rdflib/parser.py
index b8dfdf62..2a2875d9 100644
--- a/rdflib/parser.py
+++ b/rdflib/parser.py
@@ -16,7 +16,7 @@ import pathlib
import sys
from io import BytesIO, TextIOBase, TextIOWrapper, StringIO, BufferedIOBase
-from typing import Optional, Union
+from typing import Any, Dict, Optional, Union
from urllib.request import Request
from urllib.request import url2pathname
@@ -258,7 +258,7 @@ def create_input_source(
publicID=None,
location=None,
file=None,
- data: Optional[Union[str, bytes, bytearray]] = None,
+ data: Optional[Union[str, bytes, bytearray, Dict[Any, Any]]] = None,
format=None,
):
"""