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
|
# I100: Import statements are in the wrong order
|
||||||
# I101: Imported names are in the wrong order. Should be
|
# I101: Imported names are in the wrong order. Should be
|
||||||
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
|
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
|
||||||
|
builtins = c, get_config
|
||||||
exclude =
|
exclude =
|
||||||
.cache,
|
.cache,
|
||||||
.github,
|
.github,
|
||||||
docs,
|
docs,
|
||||||
examples,
|
|
||||||
jupyterhub/alembic*,
|
jupyterhub/alembic*,
|
||||||
onbuild,
|
onbuild,
|
||||||
scripts,
|
scripts,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
# run cull-idle as a service
|
# run cull-idle as a service
|
||||||
|
|
||||||
c.JupyterHub.services = [
|
c.JupyterHub.services = [
|
||||||
{
|
{
|
||||||
'name': 'cull-idle',
|
'name': 'cull-idle',
|
||||||
|
@@ -21,6 +21,7 @@ class AnnouncementRequestHandler(HubAuthenticated, web.RequestHandler):
|
|||||||
@web.authenticated
|
@web.authenticated
|
||||||
def post(self):
|
def post(self):
|
||||||
"""Update announcement"""
|
"""Update announcement"""
|
||||||
|
user = self.current_user
|
||||||
doc = escape.json_decode(self.request.body)
|
doc = escape.json_decode(self.request.body)
|
||||||
self.storage["announcement"] = doc["announcement"]
|
self.storage["announcement"] = doc["announcement"]
|
||||||
self.storage["timestamp"] = datetime.datetime.now().isoformat()
|
self.storage["timestamp"] = datetime.datetime.now().isoformat()
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
# To run the announcement service managed by the hub, add this.
|
# To run the announcement service managed by the hub, add this.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user