summaryrefslogtreecommitdiff
path: root/examples/slice.py
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2018-10-30 14:21:41 +0100
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2018-10-30 15:38:42 +0100
commit785e37932e71a02ab8c31257694060f550ff72a6 (patch)
tree43bc2158ce60168cebe15a0f88ea2aeddb30520d /examples/slice.py
parentfac8b840627013e1b9bbe76bd75c8e9d5d7b4cdf (diff)
downloadrdflib-785e37932e71a02ab8c31257694060f550ff72a6.tar.gz
a slightly opinionated autopep8 run
opinions is mainly: no to long lines, but not at any cost. notation3.py crashses autopep :D Also rdflib/__init__.py gets completely broken
Diffstat (limited to 'examples/slice.py')
-rw-r--r--examples/slice.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/slice.py b/examples/slice.py
index e3d21b40..525edb95 100644
--- a/examples/slice.py
+++ b/examples/slice.py
@@ -14,16 +14,16 @@ See :meth:`rdflib.graph.Graph.__getitem__` for details
from rdflib import Graph, RDF
from rdflib.namespace import FOAF
-if __name__=='__main__':
+if __name__ == '__main__':
graph = Graph()
graph.load("foaf.rdf")
- for person in graph[: RDF.type : FOAF.Person]:
+ for person in graph[: RDF.type: FOAF.Person]:
- friends = list(graph[person:FOAF.knows * '+'/FOAF.name])
+ friends = list(graph[person:FOAF.knows * '+' / FOAF.name])
if friends:
- print("%s's circle of friends:"%graph.value(person, FOAF.name))
+ print("%s's circle of friends:" % graph.value(person, FOAF.name))
for name in friends:
print(name)