Merge pull request #3428 from Carreau/doc-1

DOC: Conform to numpydoc.
This commit is contained in:
Min RK
2021-04-19 08:56:42 +02:00
committed by GitHub
4 changed files with 14 additions and 14 deletions

View File

@@ -26,10 +26,9 @@ def write_alembic_ini(alembic_ini='alembic.ini', db_url='sqlite:///jupyterhub.sq
Parameters Parameters
---------- ----------
alembic_ini : str
alembic_ini: str
path to the alembic.ini file that should be written. path to the alembic.ini file that should be written.
db_url: str db_url : str
The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`. The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`.
""" """
with open(ALEMBIC_INI_TEMPLATE_PATH) as f: with open(ALEMBIC_INI_TEMPLATE_PATH) as f:
@@ -58,13 +57,11 @@ def _temp_alembic_ini(db_url):
Parameters Parameters
---------- ----------
db_url : str
db_url: str
The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`. The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`.
Returns Returns
------- -------
alembic_ini: str alembic_ini: str
The path to the temporary alembic.ini that we have created. The path to the temporary alembic.ini that we have created.
This file will be cleaned up on exit from the context manager. This file will be cleaned up on exit from the context manager.

View File

@@ -668,12 +668,15 @@ class HubOAuth(HubAuth):
Parameters Parameters
---------- ----------
handler (RequestHandler): A tornado RequestHandler handler : RequestHandler
next_url (str): The page to redirect to on successful login A tornado RequestHandler
next_url : str
The page to redirect to on successful login
Returns Returns
------- -------
state (str): The OAuth state that has been stored in the cookie (url safe, base64-encoded) state : str
The OAuth state that has been stored in the cookie (url safe, base64-encoded)
""" """
extra_state = {} extra_state = {}
if handler.get_cookie(self.state_cookie_name): if handler.get_cookie(self.state_cookie_name):
@@ -710,7 +713,8 @@ class HubOAuth(HubAuth):
Parameters Parameters
---------- ----------
next_url (str): The URL of the page to redirect to on successful login. next_url : str
The URL of the page to redirect to on successful login.
Returns Returns
------- -------

View File

@@ -729,7 +729,7 @@ class Spawner(LoggingConfigurable):
Returns Returns
------- -------
state: dict state: dict
a JSONable dict of state a JSONable dict of state
""" """
state = {} state = {}
return state return state

View File

@@ -70,9 +70,8 @@ def check_db_locks(func):
The decorator relies on an instance of JupyterHubApp being the first The decorator relies on an instance of JupyterHubApp being the first
argument to the decorated function. argument to the decorated function.
Example Examples
------- --------
@check_db_locks @check_db_locks
def api_request(app, *api_path, **kwargs): def api_request(app, *api_path, **kwargs):