mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
flake8 fixes: unused imports and f-strings without vars
This commit is contained in:
2
.github/integration-test.py
vendored
2
.github/integration-test.py
vendored
@@ -104,7 +104,7 @@ def run_test(image_name, test_name, bootstrap_pip_spec, test_files, upgrade, ins
|
|||||||
if upgrade:
|
if upgrade:
|
||||||
run_container_command(
|
run_container_command(
|
||||||
test_name,
|
test_name,
|
||||||
f'curl -L https://tljh.jupyter.org/bootstrap.py | python3 -'
|
'curl -L https://tljh.jupyter.org/bootstrap.py | python3 -'
|
||||||
)
|
)
|
||||||
|
|
||||||
run_container_command(
|
run_container_command(
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from hubtraf.user import User
|
|||||||
from hubtraf.auth.dummy import login_dummy
|
from hubtraf.auth.dummy import login_dummy
|
||||||
import pytest
|
import pytest
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import asyncio
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import os
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from functools import partial
|
|||||||
import asyncio
|
import asyncio
|
||||||
import pwd
|
import pwd
|
||||||
import grp
|
import grp
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from os import system
|
from os import system
|
||||||
from tljh.normalize import generate_system_username
|
from tljh.normalize import generate_system_username
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import pytest
|
|||||||
from tljh.config import (
|
from tljh.config import (
|
||||||
reload_component,
|
reload_component,
|
||||||
set_config_value,
|
set_config_value,
|
||||||
unset_config_value,
|
|
||||||
CONFIG_FILE,
|
CONFIG_FILE,
|
||||||
CONFIG_DIR,
|
CONFIG_DIR,
|
||||||
STATE_DIR,
|
STATE_DIR,
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ def test_new_user_create():
|
|||||||
# Call ensure_user to make sure the user plugin gets called
|
# Call ensure_user to make sure the user plugin gets called
|
||||||
user.ensure_user(username)
|
user.ensure_user(username)
|
||||||
|
|
||||||
with open(f"test_new_user_create") as f:
|
with open("test_new_user_create") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
||||||
assert content == username
|
assert content == username
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Test configurer
|
Test configurer
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from traitlets import Dict
|
|
||||||
from traitlets.config import Config
|
from traitlets.config import Config
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"""Test traefik configuration"""
|
"""Test traefik configuration"""
|
||||||
import os
|
import os
|
||||||
from unittest import mock
|
|
||||||
|
|
||||||
import toml
|
import toml
|
||||||
import pytest
|
import pytest
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ tljh-config show firstlevel.second_level
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import asyncio
|
|
||||||
from collections.abc import Sequence, Mapping
|
from collections.abc import Sequence, Mapping
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import bcrypt
|
|||||||
import pluggy
|
import pluggy
|
||||||
import requests
|
import requests
|
||||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||||
from getpass import getpass
|
|
||||||
|
|
||||||
from tljh import (
|
from tljh import (
|
||||||
apt,
|
apt,
|
||||||
@@ -26,7 +25,6 @@ from tljh import (
|
|||||||
systemd,
|
systemd,
|
||||||
traefik,
|
traefik,
|
||||||
user,
|
user,
|
||||||
utils
|
|
||||||
)
|
)
|
||||||
from .config import (
|
from .config import (
|
||||||
CONFIG_DIR,
|
CONFIG_DIR,
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ JupyterHub config for the littlest jupyterhub.
|
|||||||
from glob import glob
|
from glob import glob
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from systemdspawner import SystemdSpawner
|
|
||||||
from tljh import configurer
|
from tljh import configurer
|
||||||
from tljh.config import INSTALL_PREFIX, USER_ENV_PREFIX, CONFIG_DIR
|
from tljh.config import INSTALL_PREFIX, USER_ENV_PREFIX, CONFIG_DIR
|
||||||
from tljh.utils import get_plugin_manager
|
from tljh.utils import get_plugin_manager
|
||||||
|
|||||||
Reference in New Issue
Block a user