diff --git a/jupyterhub/auth.py b/jupyterhub/auth.py index 8065fb67..bae47218 100644 --- a/jupyterhub/auth.py +++ b/jupyterhub/auth.py @@ -186,9 +186,9 @@ class Authenticator(LoggingConfigurable): handler (tornado.web.RequestHandler): the current request handler data (dict): The formdata of the login form. The default form has 'username' and 'password' fields. - Return: - str: the username of the authenticated user - None: Authentication failed + Returns: + username (str or None): The username of the authenticated user, + or None if Authentication failed """ def pre_spawn_start(self, user, spawner): @@ -278,8 +278,9 @@ class Authenticator(LoggingConfigurable): app (JupyterHub Application): the application object, in case it needs to be accessed for info. Returns: - list: list of ``('/url', Handler)`` tuples passed to tornado. - The Hub prefix is added to any URLs. + handlers (list): + list of ``('/url', Handler)`` tuples passed to tornado. + The Hub prefix is added to any URLs. """ return [ ('/login', LoginHandler), diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py index 1af48b16..55f8cd92 100644 --- a/jupyterhub/spawner.py +++ b/jupyterhub/spawner.py @@ -1,5 +1,5 @@ """ -Contains abstract base Spawner class & default implementation. +Contains base Spawner class & default implementation """ # Copyright (c) Jupyter Development Team. @@ -31,8 +31,7 @@ from .utils import random_port class Spawner(LoggingConfigurable): - """ - Abstract base class for spawning single-user notebook servers. + """Base class for spawning single-user notebook servers. Subclass this, and override the following methods: @@ -53,8 +52,7 @@ class Spawner(LoggingConfigurable): authenticator = Any() api_token = Unicode() - ip = Unicode( - '127.0.0.1', + ip = Unicode('127.0.0.1', help=""" The IP address (or hostname) the single-user server should listen on. @@ -62,8 +60,7 @@ class Spawner(LoggingConfigurable): """ ).tag(config=True) - port = Integer( - 0, + port = Integer(0, help=""" The port for single-user servers to listen on. @@ -73,8 +70,7 @@ class Spawner(LoggingConfigurable): """ ) - start_timeout = Integer( - 60, + start_timeout = Integer(60, help=""" Timeout (in seconds) before giving up on starting of single-user server. @@ -84,8 +80,7 @@ class Spawner(LoggingConfigurable): """ ).tag(config=True) - http_timeout = Integer( - 30, + http_timeout = Integer(30, help=""" Timeout (in seconds) before giving up on a spawned HTTP server @@ -95,8 +90,7 @@ class Spawner(LoggingConfigurable): """ ).tag(config=True) - poll_interval = Integer( - 30, + poll_interval = Integer(30, help=""" Interval (in seconds) on which to poll the spawner for single-user server's status. @@ -110,15 +104,13 @@ class Spawner(LoggingConfigurable): _poll_callback = Any() debug = Bool(False, - help=""" - Enable debug-logging of the single-user server. - """ + help="Enable debug-logging of the single-user server" ).tag(config=True) options_form = Unicode( - "", help=""" An HTML form for options a user can specify on launching their server. + The surrounding `