Skip to content

Commit

Permalink
Fix indentations in the docstrings causing Sphinx warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mprahl committed Oct 19, 2018
1 parent 16f5fa0 commit ff9464c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion estuary/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def conditional_connect(relationship, new_node):
:param neomodel.RelationshipManager relationship: a relationship to connect on
:param neomodel.StructuredNode new_node: the node to create the relationship with
:raises NotImplementedError: if this method is called with a relationship of cardinality of
one
one
"""
if new_node not in relationship:
if len(relationship) == 0:
Expand Down
2 changes: 1 addition & 1 deletion estuary/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_neo4j_node(resource_name, uid):
:param str uid: a string of the unique identifier defined in the neomodel model
:return: a neomodel model object
:raises ValidationError: if the requested resource doesn't exist or doesn't have a
UniqueIdProperty
UniqueIdProperty
"""
# To prevent a ciruclar import, we must import this here
from estuary.models import all_models
Expand Down
12 changes: 6 additions & 6 deletions estuary/utils/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_story_nodes(self, item, reverse=False, limit=False):
:param node item: a Neo4j node whose story is requested by the user
:kwarg bool reverse: specifies the direction to proceed from current node
corresponding to the story_flow
corresponding to the story_flow
:kwarg bool limit: specifies if LIMIT keyword should be added to the created cypher query
:return: story paths for a particular artifact
:rtype: list
Expand Down Expand Up @@ -117,7 +117,7 @@ def get_sibling_nodes_count(self, results, reverse=False):
:param list results: contains inflated results from Neo4j
:kwarg bool reverse: determines the direction the story is traversed in
(i.e. forward/backward)
(i.e. forward/backward)
:return: yield the results count (int) received from Neo4j
:rtype: generator
"""
Expand Down Expand Up @@ -150,9 +150,9 @@ def get_sibling_nodes(self, siblings_node_label, story_node, count=False):
:param str siblings_node_label: node label for which the siblings count is to be calculated
:param EstuaryStructuredNode story_node: node in the story that has the desired
relationships with the siblings (specified with siblings_node_label)
relationships with the siblings (specified with siblings_node_label)
:kwarg bool count: determines if only count of sibling nodes should be returned
or the nodes themselves
or the nodes themselves
:return: siblings count of curr_node | sibling nodes
:rtype: int | EstuaryStructuredNode
"""
Expand Down Expand Up @@ -245,10 +245,10 @@ def get_siblings_description(story_node_display_name, story_node_story_flow, bac
Generate a description of the siblings.
:param string story_node_display_name: the preformatted name to be displayed for the story
node
node
:param dict story_node_story_flow: has forward and backward relationships of the story node
:param bool backward: determines the relationship direction the story node has with the
siblings in the story
siblings in the story
:return: returns the appropriate siblings title
:rtype: string
"""
Expand Down
15 changes: 7 additions & 8 deletions scrapers/teiid.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ def get_connection(self, db_name, force_new=False, retry=None):
Return an existing psycopg2 connection and establish it if needed.
:param str db_name: the database name to get a connection to
:kwarg bool force_new: forces a new database connection even if one
already exists
:kwarg int retry: the number of times to retry a failed connection. If this
is not set, then the Teiid connection attempt will be repeated until it is successful.
:kwarg bool force_new: forces a new database connection even if one already exists
:kwarg int retry: the number of times to retry a failed connection. If this is not set,
then the Teiid connection attempt will be repeated until it is successful.
:return: a connection to Teiid
:rtype: psycopg2 connection
"""
Expand Down Expand Up @@ -85,10 +84,10 @@ def query(self, sql, db='public', retry=None):
:param str sql: the SQL query to send to the database
:kwarg str db: the database name to query on
:kwarg int retry: the number of times to retry a failed query. If this
is not set, then the Teiid query will be repeated until it is successful.
:return: a list of rows from Teiid. Each row is a dictionary
with the column headers as the keys.
:kwarg int retry: the number of times to retry a failed query. If this is not set, then the
Teiid query will be repeated until it is successful.
:return: a list of rows from Teiid. Each row is a dictionary with the column headers as
the keys.
:rtype: list
"""
con = self.get_connection(db)
Expand Down

0 comments on commit ff9464c

Please sign in to comment.