mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 18:44:10 +00:00
pass flake8 on examples
define flake8 builtins for config files (c, get_config)
This commit is contained in:
3
.flake8
3
.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,
|
||||
|
@@ -1,4 +1,7 @@
|
||||
import sys
|
||||
|
||||
# run cull-idle as a service
|
||||
|
||||
c.JupyterHub.services = [
|
||||
{
|
||||
'name': 'cull-idle',
|
||||
|
@@ -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()
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
|
||||
# To run the announcement service managed by the hub, add this.
|
||||
|
||||
|
Reference in New Issue
Block a user