diff --git a/rdflib/plugins/serializers/turtle.py b/rdflib/plugins/serializers/turtle.py index 32b4b90608..e594d04f5e 100644 --- a/rdflib/plugins/serializers/turtle.py +++ b/rdflib/plugins/serializers/turtle.py @@ -230,13 +230,15 @@ def reset(self): def serialize( self, stream: BufferedIOBase, - base: Optional[str], - encoding: Optional[str], + base: Optional[str] = None, + encoding: Optional[str] = None, spacious: Optional[bool] = None, **args ): self.reset() - self.stream = TextIOWrapper(stream, encoding, errors="replace", write_through=True) + self.stream = TextIOWrapper( + stream, encoding, errors="replace", write_through=True + ) # self.encoding = encoding # if base is given here, use that, if not and a base is set for the graph use that if base is not None: