Skip to content

Commit

Permalink
fix docstr indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Nov 23, 2023
1 parent a2878ad commit 266e453
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
24 changes: 12 additions & 12 deletions cognite/client/_api/data_modeling/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,30 +292,30 @@ def retrieve(
>>> from cognite.client import CogniteClient
>>> c = CogniteClient()
>>> res = c.data_modeling.instances.retrieve(nodes=("mySpace", "myNodeExternalId"),
... edges=("mySpace", "myEdgeExternalId"),
... sources=("mySpace", "myViewExternalId", "myViewVersion")
... )
>>> res = c.data_modeling.instances.retrieve(
... nodes=("mySpace", "myNodeExternalId"),
... edges=("mySpace", "myEdgeExternalId"),
... sources=("mySpace", "myViewExternalId", "myViewVersion"))
Retrieve nodes an edges using the built in data class
>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId, ViewId
>>> c = CogniteClient()
>>> res = c.data_modeling.instances.retrieve(NodeId("mySpace", "myNode"),
... EdgeId("mySpace", "myEdge"),
... ViewId("mySpace", "myViewExternalId", "myViewVersion")
... )
>>> res = c.data_modeling.instances.retrieve(
... NodeId("mySpace", "myNode"),
... EdgeId("mySpace", "myEdge"),
... ViewId("mySpace", "myViewExternalId", "myViewVersion"))
Retrieve nodes an edges using the the view object as source
>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes.data_modeling import NodeId, EdgeId
>>> c = CogniteClient()
>>> res = c.data_modeling.instances.retrieve(NodeId("mySpace", "myNode"),
... EdgeId("mySpace", "myEdge"),
... sources=("myspace", "myView")
... )
>>> res = c.data_modeling.instances.retrieve(
... NodeId("mySpace", "myNode"),
... EdgeId("mySpace", "myEdge"),
... sources=("myspace", "myView"))
"""
identifiers = self._load_node_and_edge_ids(nodes, edges)
other_params = self._create_other_params(
Expand Down
5 changes: 3 additions & 2 deletions cognite/client/_api/sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,9 @@ def update(
>>> from cognite.client.data_classes import SequenceUpdate, SequenceColumn
>>> c = CogniteClient()
>>>
>>> column_def = [SequenceColumn(value_type ="String",external_id="user", description ="some description"),
... SequenceColumn(value_type="Double", external_id="amount")]
>>> column_def = [
... SequenceColumn(value_type ="String",external_id="user", description ="some description"),
... SequenceColumn(value_type="Double", external_id="amount")]
>>> my_update = SequenceUpdate(id=1).columns.add(column_def)
>>> res = c.sequences.update(my_update)
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/data_classes/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class FunctionTaskParameters(WorkflowTaskParameters):
... "workflow_data": "${workflow.input}",
... "task1_input": "${task1.input}",
... "task1_output": "${task1.output}"
... },
... },
... ),
... )
"""
Expand Down

0 comments on commit 266e453

Please sign in to comment.