2222)
2323from urllib .parse import urlparse
2424from urllib .request import url2pathname
25- from warnings import warn
2625
2726import rdflib .exceptions as exceptions
2827import rdflib .namespace as namespace # noqa: F401 # This is here because it is used in a docstring.
@@ -390,7 +389,7 @@ def __str__(self):
390389 "[a rdfg:Graph;rdflib:storage " + "[a rdflib:Store;rdfs:label '%s']]."
391390 ) % self .store .__class__ .__name__
392391
393- def toPython (self ):
392+ def toPython (self ): # noqa: N802
394393 return self
395394
396395 def destroy (self , configuration ):
@@ -434,7 +433,7 @@ def add(self, triple: Tuple[Node, Node, Node]):
434433 self .__store .add ((s , p , o ), self , quoted = False )
435434 return self
436435
437- def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]):
436+ def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]): # noqa: N802
438437 """Add a sequence of triple with context"""
439438
440439 self .__store .addN (
@@ -919,7 +918,7 @@ def items(self, list):
919918 raise ValueError ("List contains a recursive rdf:rest reference" )
920919 chain .add (list )
921920
922- def transitiveClosure (self , func , arg , seen = None ):
921+ def transitiveClosure (self , func , arg , seen = None ): # noqa: N802
923922 """
924923 Generates transitive closure of a user-defined
925924 function against the graph
@@ -1174,7 +1173,7 @@ def parse(
11741173 source : Optional [
11751174 Union [IO [bytes ], TextIO , InputSource , str , bytes , pathlib .PurePath ]
11761175 ] = None ,
1177- publicID : Optional [str ] = None ,
1176+ publicID : Optional [str ] = None , # noqa: N803
11781177 format : Optional [str ] = None ,
11791178 location : Optional [str ] = None ,
11801179 file : Optional [Union [BinaryIO , TextIO ]] = None ,
@@ -1296,7 +1295,7 @@ def query(
12961295 query_object ,
12971296 processor : Union [str , query .Processor ] = "sparql" ,
12981297 result : Union [str , Type [query .Result ]] = "sparql" ,
1299- initNs = None ,
1298+ initNs = None , # noqa: N803
13001299 initBindings = None ,
13011300 use_store_provided : bool = True ,
13021301 ** kwargs ,
@@ -1315,8 +1314,8 @@ def query(
13151314
13161315 """
13171316
1318- initBindings = initBindings or {}
1319- initNs = initNs or dict (self .namespaces ())
1317+ initBindings = initBindings or {} # noqa: N806
1318+ initNs = initNs or dict (self .namespaces ()) # noqa: N806
13201319
13211320 if hasattr (self .store , "query" ) and use_store_provided :
13221321 try :
@@ -1341,14 +1340,14 @@ def update(
13411340 self ,
13421341 update_object ,
13431342 processor = "sparql" ,
1344- initNs = None ,
1343+ initNs = None , # noqa: N803
13451344 initBindings = None ,
13461345 use_store_provided = True ,
13471346 ** kwargs ,
13481347 ):
13491348 """Update this graph with the given update query."""
1350- initBindings = initBindings or {}
1351- initNs = initNs or dict (self .namespaces ())
1349+ initBindings = initBindings or {} # noqa: N806
1350+ initNs = initNs or dict (self .namespaces ()) # noqa: N806
13521351
13531352 if hasattr (self .store , "update" ) and use_store_provided :
13541353 try :
@@ -1719,7 +1718,7 @@ def _graph(self, c: Optional[Union[Graph, Node, str]]) -> Optional[Graph]:
17191718 else :
17201719 return c
17211720
1722- def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]):
1721+ def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]): # noqa: N802
17231722 """Add a sequence of triples with context"""
17241723
17251724 self .store .addN (
@@ -1844,7 +1843,7 @@ def parse(
18441843 source : Optional [
18451844 Union [IO [bytes ], TextIO , InputSource , str , bytes , pathlib .PurePath ]
18461845 ] = None ,
1847- publicID : Optional [str ] = None ,
1846+ publicID : Optional [str ] = None , # noqa: N803
18481847 format : Optional [str ] = None ,
18491848 location : Optional [str ] = None ,
18501849 file : Optional [Union [BinaryIO , TextIO ]] = None ,
@@ -2067,7 +2066,7 @@ def graph(self, identifier=None, base=None):
20672066 def parse (
20682067 self ,
20692068 source = None ,
2070- publicID = None ,
2069+ publicID = None , # noqa: N803
20712070 format = None ,
20722071 location = None ,
20732072 file = None ,
@@ -2140,7 +2139,7 @@ def add(self, triple: Tuple[Node, Node, Node]):
21402139 self .store .add ((s , p , o ), self , quoted = True )
21412140 return self
21422141
2143- def addN (self , quads : Tuple [Node , Node , Node , Any ]) -> "QuotedGraph" : # type: ignore[override]
2142+ def addN (self , quads : Tuple [Node , Node , Node , Any ]) -> "QuotedGraph" : # type: ignore[override] # noqa: N802
21442143 """Add a sequence of triple with context"""
21452144
21462145 self .store .addN (
@@ -2198,7 +2197,7 @@ def __init__(self, graph, subject):
21982197 """
21992198
22002199 _list = self ._list = list ()
2201- LI_INDEX = URIRef (str (RDF ) + "_" )
2200+ LI_INDEX = URIRef (str (RDF ) + "_" ) # noqa: N806
22022201 for (p , o ) in graph .predicate_objects (subject ):
22032202 if p .startswith (LI_INDEX ): # != RDF.Seq: #
22042203 i = int (p .replace (LI_INDEX , "" ))
@@ -2208,7 +2207,7 @@ def __init__(self, graph, subject):
22082207 # by sorting the keys (by integer) we have what we want!
22092208 _list .sort ()
22102209
2211- def toPython (self ):
2210+ def toPython (self ): # noqa: N802
22122211 return self
22132212
22142213 def __iter__ (self ):
@@ -2290,7 +2289,7 @@ def close(self):
22902289 def add (self , triple ):
22912290 raise ModificationException ()
22922291
2293- def addN (self , quads ):
2292+ def addN (self , quads ): # noqa: N802
22942293 raise ModificationException ()
22952294
22962295 def remove (self , triple ):
@@ -2389,7 +2388,7 @@ def namespaces(self):
23892388 def absolutize (self , uri , defrag = 1 ):
23902389 raise UnSupportedAggregateOperation ()
23912390
2392- def parse (self , source , publicID = None , format = None , ** args ):
2391+ def parse (self , source , publicID = None , format = None , ** args ): # noqa: N803
23932392 raise ModificationException ()
23942393
23952394 def n3 (self ):
@@ -2460,7 +2459,7 @@ def add(
24602459 self .batch .append (triple_or_quad )
24612460 return self
24622461
2463- def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]):
2462+ def addN (self , quads : Iterable [Tuple [Node , Node , Node , Any ]]): # noqa: N802
24642463 if self .__batch_addn :
24652464 for q in quads :
24662465 self .add (q )
0 commit comments