diff --git a/.flake8 b/.flake8 index 06d83ee9..58538de2 100644 --- a/.flake8 +++ b/.flake8 @@ -11,12 +11,11 @@ # I100: Import statements are in the wrong order # I101: Imported names are in the wrong order. Should be ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400 - +builtins = c, get_config exclude = .cache, .github, docs, - examples, jupyterhub/alembic*, onbuild, scripts, diff --git a/examples/cull-idle/jupyterhub_config.py b/examples/cull-idle/jupyterhub_config.py index 4668fd8a..29fdc2d6 100644 --- a/examples/cull-idle/jupyterhub_config.py +++ b/examples/cull-idle/jupyterhub_config.py @@ -1,4 +1,7 @@ +import sys + # run cull-idle as a service + c.JupyterHub.services = [ { 'name': 'cull-idle', diff --git a/examples/service-announcement/announcement.py b/examples/service-announcement/announcement.py index 2c991956..98f71da5 100644 --- a/examples/service-announcement/announcement.py +++ b/examples/service-announcement/announcement.py @@ -21,6 +21,7 @@ class AnnouncementRequestHandler(HubAuthenticated, web.RequestHandler): @web.authenticated def post(self): """Update announcement""" + user = self.current_user doc = escape.json_decode(self.request.body) self.storage["announcement"] = doc["announcement"] self.storage["timestamp"] = datetime.datetime.now().isoformat() diff --git a/examples/service-announcement/jupyterhub_config.py b/examples/service-announcement/jupyterhub_config.py index 31e0289c..75b23e2d 100644 --- a/examples/service-announcement/jupyterhub_config.py +++ b/examples/service-announcement/jupyterhub_config.py @@ -1,3 +1,4 @@ +import sys # To run the announcement service managed by the hub, add this.