Skip to content

Commit

Permalink
Fix overly long lines in tutorial examples
Browse files Browse the repository at this point in the history
  • Loading branch information
RKrahl committed Aug 29, 2024
1 parent 93e1a12 commit f325880
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions doc/src/tutorial-ids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ We need a dataset in ICAT that the uploaded files should be put into,
so let's create one::

>>> from icat.query import Query
>>> query = Query(client, "Investigation", conditions=[("name", "= '12100409-ST'")])
>>> query = Query(client, "Investigation", conditions=[
... ("name", "= '12100409-ST'")
... ])
>>> investigation = client.assertedSearch(query)[0]
>>> dataset = client.new("Dataset")
>>> dataset.investigation = investigation
Expand All @@ -67,7 +69,9 @@ so let's create one::
For each of the files, we create a new datafile object and call the
:meth:`~icat.client.Client.putData` method to upload it::

>>> query = Query(client, "DatafileFormat", conditions=[("name", "= 'Text'")])
>>> query = Query(client, "DatafileFormat", conditions=[
... ("name", "= 'Text'")
... ])
>>> df_format = client.assertedSearch(query)[0]
>>> for fname in ("greet-jdoe.txt", "greet-nbour.txt", "greet-rbeck.txt"):
... datafile = client.new("Datafile",
Expand Down
8 changes: 6 additions & 2 deletions doc/tutorial/ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# --------------------

from icat.query import Query
query = Query(client, "Investigation", conditions=[("name", "= '12100409-ST'")])
query = Query(client, "Investigation", conditions=[
("name", "= '12100409-ST'")
])
investigation = client.assertedSearch(query)[0]
dataset = client.new("Dataset")
dataset.investigation = investigation
Expand All @@ -25,7 +27,9 @@

# --------------------

query = Query(client, "DatafileFormat", conditions=[("name", "= 'Text'")])
query = Query(client, "DatafileFormat", conditions=[
("name", "= 'Text'")
])
df_format = client.assertedSearch(query)[0]
for fname in ("greet-jdoe.txt", "greet-nbour.txt", "greet-rbeck.txt"):
datafile = client.new("Datafile",
Expand Down

0 comments on commit f325880

Please sign in to comment.