Skip to content

Commit 70f9857

Browse files
committed
iwana-20220126T2212-typing: checkpoint 20230908T004258
1 parent f53b070 commit 70f9857

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def find_version(filename):
285285
("py:class", "pyparsing.core.ParserElement"),
286286
]
287287

288+
288289
def autodoc_skip_member_handler(
289290
app: sphinx.application.Sphinx,
290291
what: str,

rdflib/plugins/serializers/turtle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from __future__ import annotations
2-
31
"""
42
Turtle RDF graph serializer for RDFLib.
53
See <http://www.w3.org/TeamSubmission/turtle/> for syntax specification.
64
"""
75

6+
from __future__ import annotations
7+
88
from collections import defaultdict
99
from functools import cmp_to_key
1010
from typing import (

rdflib/plugins/serializers/xmlwriter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import codecs
24
from typing import IO, TYPE_CHECKING, Dict, Iterable, List, Optional, Tuple
35
from xml.sax.saxutils import escape, quoteattr
@@ -17,10 +19,10 @@ class XMLWriter:
1719
def __init__(
1820
self,
1921
stream: IO[bytes],
20-
namespace_manager: "NamespaceManager",
22+
namespace_manager: NamespaceManager,
2123
encoding: Optional[str] = None,
2224
decl: int = 1,
23-
extra_ns: Optional[Dict[str, "Namespace"]] = None,
25+
extra_ns: Optional[Dict[str, Namespace]] = None,
2426
):
2527
encoding = encoding or "utf-8"
2628
encoder, decoder, stream_reader, stream_writer = codecs.lookup(encoding)

rdflib/resource.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
"""
42
The :class:`~rdflib.resource.Resource` class wraps a
53
:class:`~rdflib.graph.Graph`
@@ -287,7 +285,7 @@
287285
Just an image
288286
289287
"""
290-
288+
from __future__ import annotations
291289

292290
from typing import TYPE_CHECKING, Any, Optional, Union, overload
293291

@@ -301,7 +299,7 @@
301299
__all__ = ["Resource"]
302300

303301

304-
class Resource(object):
302+
class Resource:
305303
def __init__(self, graph: Graph, subject: _SubjectType):
306304
self._graph = graph
307305
self._identifier = subject

rdflib/tools/rdf2dot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
rdf2dot my_rdf_file.rdf | dot -Tpng | display
99
1010
"""
11+
from __future__ import annotations
1112

1213
import collections
1314
import html

rdflib/tools/rdfs2dot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
rdf2dot my_rdfs_file.rdf | dot -Tpng | display
1010
"""
11+
from __future__ import annotations
1112

1213
import collections
1314
import itertools

0 commit comments

Comments
 (0)