easier linting in jupyterhub_config

noqa get_import satisfies most linters
This commit is contained in:
Min RK
2024-01-23 15:21:13 +01:00
parent 4375c2db96
commit 5e166970fa
10 changed files with 15 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Configuration file for jupyterhub-demo
c = get_config()
c = get_config() # noqa
# Use DummyAuthenticator and SimpleSpawner
c.JupyterHub.spawner_class = "simple"

View File

@@ -27,9 +27,9 @@ def clean_dir_hook(spawner):
if os.path.exists(temp_path) and os.path.isdir(temp_path):
shutil.rmtree(temp_path)
c = get_config() # noqa
# attach the hook functions to the spawner
# pylint: disable=undefined-variable
c.Spawner.pre_spawn_hook = create_dir_hook
c.Spawner.post_stop_hook = clean_dir_hook

View File

@@ -8,6 +8,7 @@ if not api_token:
"Make sure to `export JUPYTERHUB_API_TOKEN=$(openssl rand -hex 32)`"
)
c = get_config() # noqa
# tell JupyterHub to register the service as an external oauth client
c.JupyterHub.services = [
{

View File

@@ -1,6 +1,6 @@
import sys
c = get_config()
c = get_config() # noqa
# To run the announcement service managed by the hub, add this.

View File

@@ -19,6 +19,8 @@ else:
service_name = "fastapi"
oauth_redirect_uri = f"{public_host}/services/{service_name}/oauth_callback"
c = get_config() # noqa
c.JupyterHub.services = [
{
"name": service_name,

View File

@@ -1,3 +1,5 @@
c = get_config() # noqa
# our user list
c.Authenticator.allowed_users = ['minrk', 'ellisonbg', 'willingc']

View File

@@ -1,3 +1,5 @@
c = get_config() # noqa
# our user list
c.Authenticator.allowed_users = ['minrk', 'ellisonbg', 'willingc']

View File

@@ -1,3 +1,5 @@
c = get_config() # noqa
c.JupyterHub.services = [
{
'name': 'whoami',

View File

@@ -1,5 +1,7 @@
import sys
c = get_config() # noqa
c.JupyterHub.services = [
{
'name': 'whoami-api',

View File

@@ -6,6 +6,7 @@ import shlex
from jupyterhub.spawner import LocalProcessSpawner
c = get_config() # noqa
class DemoFormSpawner(LocalProcessSpawner):
def _options_form_default(self):