Skip to content

Commit 0ab51d4

Browse files
authored
Merge pull request #861 from RDFLib/issue_417
use <<= instead of deprecated <<
2 parents 99c23be + 30416f6 commit 0ab51d4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

rdflib/plugins/sparql/parser.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def _hexExpand(match):
467467
ZeroOrMore('|' + ParamList('part', PathSequence)))
468468

469469
# [88] Path ::= PathAlternative
470-
Path << PathAlternative
470+
Path <<= PathAlternative
471471

472472
# [84] VerbPath ::= Path
473473
VerbPath = Path
@@ -522,10 +522,10 @@ def _hexExpand(match):
522522
BlankNodePropertyListPath.setParseAction(expandBNodeTriples)
523523

524524
# [98] TriplesNode ::= Collection | BlankNodePropertyList
525-
TriplesNode << (Collection | BlankNodePropertyList)
525+
TriplesNode <<= (Collection | BlankNodePropertyList)
526526

527527
# [100] TriplesNodePath ::= CollectionPath | BlankNodePropertyListPath
528-
TriplesNodePath << (CollectionPath | BlankNodePropertyListPath)
528+
TriplesNodePath <<= (CollectionPath | BlankNodePropertyListPath)
529529

530530
# [75] TriplesSameSubject ::= VarOrTerm PropertyListNotEmpty | TriplesNode PropertyList
531531
TriplesSameSubject = VarOrTerm + PropertyListNotEmpty | TriplesNode + \
@@ -534,7 +534,7 @@ def _hexExpand(match):
534534

535535
# [52] TriplesTemplate ::= TriplesSameSubject ( '.' Optional(TriplesTemplate) )?
536536
TriplesTemplate = Forward()
537-
TriplesTemplate << (ParamList('triples', TriplesSameSubject) + Optional(
537+
TriplesTemplate <<= (ParamList('triples', TriplesSameSubject) + Optional(
538538
Suppress('.') + Optional(TriplesTemplate)))
539539

540540
# [51] QuadsNotTriples ::= 'GRAPH' VarOrIri '{' Optional(TriplesTemplate) '}'
@@ -558,7 +558,7 @@ def _hexExpand(match):
558558

559559
# [55] TriplesBlock ::= TriplesSameSubjectPath ( '.' Optional(TriplesBlock) )?
560560
TriplesBlock = Forward()
561-
TriplesBlock << (ParamList('triples', TriplesSameSubjectPath) + Optional(
561+
TriplesBlock <<= (ParamList('triples', TriplesSameSubjectPath) + Optional(
562562
Suppress('.') + Optional(TriplesBlock)))
563563

564564

@@ -804,7 +804,7 @@ def _hexExpand(match):
804804
'||' + ParamList('other', ConditionalAndExpression))).setEvalFn(op.ConditionalOrExpression)
805805

806806
# [110] Expression ::= ConditionalOrExpression
807-
Expression << ConditionalOrExpression
807+
Expression <<= ConditionalOrExpression
808808

809809

810810
# [69] Constraint ::= BrackettedExpression | BuiltInCall | FunctionCall
@@ -911,7 +911,7 @@ def _hexExpand(match):
911911

912912
# [74] ConstructTriples ::= TriplesSameSubject ( '.' Optional(ConstructTriples) )?
913913
ConstructTriples = Forward()
914-
ConstructTriples << (ParamList('template', TriplesSameSubject) + Optional(
914+
ConstructTriples <<= (ParamList('template', TriplesSameSubject) + Optional(
915915
Suppress('.') + Optional(ConstructTriples)))
916916

917917
# [73] ConstructTemplate ::= '{' Optional(ConstructTriples) '}'
@@ -989,7 +989,7 @@ def _hexExpand(match):
989989
SolutionModifier + ValuesClause)
990990

991991
# [53] GroupGraphPattern ::= '{' ( SubSelect | GroupGraphPatternSub ) '}'
992-
GroupGraphPattern << (
992+
GroupGraphPattern <<= (
993993
Suppress('{') + (SubSelect | GroupGraphPatternSub) + Suppress('}'))
994994

995995
# [7] SelectQuery ::= SelectClause DatasetClause* WhereClause SolutionModifier
@@ -1012,7 +1012,7 @@ def _hexExpand(match):
10121012

10131013
# [29] Update ::= Prologue ( Update1 ( ';' Update )? )?
10141014
Update = Forward()
1015-
Update << (ParamList('prologue', Prologue) + Optional(ParamList('request',
1015+
Update <<= (ParamList('prologue', Prologue) + Optional(ParamList('request',
10161016
Update1) + Optional(';' + Update)))
10171017

10181018

0 commit comments

Comments
 (0)