pass flake8 on examples

define flake8 builtins for config files (c, get_config)
This commit is contained in:
Min RK
2019-02-14 14:54:25 +01:00
parent 856923b35f
commit ada8582768
4 changed files with 6 additions and 2 deletions

View File

@@ -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,

View File

@@ -1,4 +1,7 @@
import sys
# run cull-idle as a service
c.JupyterHub.services = [
{
'name': 'cull-idle',

View File

@@ -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()

View File

@@ -1,3 +1,4 @@
import sys
# To run the announcement service managed by the hub, add this.