diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py index ac52039..f69aceb 100644 --- a/bootstrap/bootstrap.py +++ b/bootstrap/bootstrap.py @@ -42,6 +42,7 @@ Command line flags, from "bootstrap.py --help": can also pass a branch name such as 'main' or a commit hash. """ + import logging import multiprocessing import os diff --git a/integration-tests/plugins/simplest/tljh_simplest.py b/integration-tests/plugins/simplest/tljh_simplest.py index 015b504..ff433f8 100644 --- a/integration-tests/plugins/simplest/tljh_simplest.py +++ b/integration-tests/plugins/simplest/tljh_simplest.py @@ -1,6 +1,7 @@ """ Simplest plugin that exercises all the hooks defined in tljh/hooks.py. """ + from tljh.hooks import hookimpl diff --git a/integration-tests/test_bootstrap.py b/integration-tests/test_bootstrap.py index 09ae140..eac9c92 100644 --- a/integration-tests/test_bootstrap.py +++ b/integration-tests/test_bootstrap.py @@ -9,6 +9,7 @@ FIXME: The last test stands out and could be part of the other tests, and the first two could be more like unit tests. Ideally, this file is significantly reduced. """ + import concurrent.futures import os import subprocess diff --git a/integration-tests/test_proxy.py b/integration-tests/test_proxy.py index cc9d766..e1d376c 100644 --- a/integration-tests/test_proxy.py +++ b/integration-tests/test_proxy.py @@ -1,4 +1,5 @@ """tests for the proxy""" + import os import shutil import ssl diff --git a/integration-tests/test_simplest_plugin.py b/integration-tests/test_simplest_plugin.py index 96eb0a5..9c2337b 100644 --- a/integration-tests/test_simplest_plugin.py +++ b/integration-tests/test_simplest_plugin.py @@ -2,6 +2,7 @@ Test the plugin in integration-tests/plugins/simplest that makes use of all tljh recognized plugin hooks that are defined in tljh/hooks.py. """ + import os import subprocess diff --git a/tests/conftest.py b/tests/conftest.py index cf765b9..106d534 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """pytest fixtures""" + import os import types from importlib import reload diff --git a/tests/test_conda.py b/tests/test_conda.py index 6d44595..397499e 100644 --- a/tests/test_conda.py +++ b/tests/test_conda.py @@ -1,6 +1,7 @@ """ Test conda commandline wrappers """ + import os import subprocess import tempfile diff --git a/tests/test_installer.py b/tests/test_installer.py index 07081e4..f06bb6e 100644 --- a/tests/test_installer.py +++ b/tests/test_installer.py @@ -1,6 +1,7 @@ """ Unit test functions in installer.py """ + import json import os from subprocess import PIPE, run diff --git a/tests/test_migrator.py b/tests/test_migrator.py index 87275f6..91821a8 100644 --- a/tests/test_migrator.py +++ b/tests/test_migrator.py @@ -1,6 +1,7 @@ """ Unit test functions in installer.py """ + import os from datetime import date diff --git a/tests/test_normalize.py b/tests/test_normalize.py index fe7c623..d408c3f 100644 --- a/tests/test_normalize.py +++ b/tests/test_normalize.py @@ -1,6 +1,7 @@ """ Test functions for normalizing various kinds of values """ + from tljh.normalize import generate_system_username diff --git a/tests/test_traefik.py b/tests/test_traefik.py index f950266..9b0c8f8 100644 --- a/tests/test_traefik.py +++ b/tests/test_traefik.py @@ -1,4 +1,5 @@ """Test traefik configuration""" + import os import pytest diff --git a/tests/test_user.py b/tests/test_user.py index 5bda68d..148e174 100644 --- a/tests/test_user.py +++ b/tests/test_user.py @@ -1,6 +1,7 @@ """ Test wrappers in tljw.user module """ + import grp import os import os.path diff --git a/tljh/apt.py b/tljh/apt.py index b5b0845..d746f45 100644 --- a/tljh/apt.py +++ b/tljh/apt.py @@ -1,6 +1,7 @@ """ Utilities for working with the apt package manager """ + import os import subprocess diff --git a/tljh/conda.py b/tljh/conda.py index a543645..49737c4 100644 --- a/tljh/conda.py +++ b/tljh/conda.py @@ -1,6 +1,7 @@ """ Wrap conda commandline program """ + import contextlib import hashlib import json diff --git a/tljh/hooks.py b/tljh/hooks.py index ddaa2a3..8bdaf79 100644 --- a/tljh/hooks.py +++ b/tljh/hooks.py @@ -1,6 +1,7 @@ """ Hook specifications that pluggy plugins can override """ + import pluggy hookspec = pluggy.HookspecMarker("tljh") diff --git a/tljh/log.py b/tljh/log.py index ed7eca4..7a0d5e7 100644 --- a/tljh/log.py +++ b/tljh/log.py @@ -1,4 +1,5 @@ """Setup tljh logging""" + import logging import os diff --git a/tljh/normalize.py b/tljh/normalize.py index 01d1777..4f4c9e1 100644 --- a/tljh/normalize.py +++ b/tljh/normalize.py @@ -1,6 +1,7 @@ """ Functions to normalize various inputs """ + import hashlib diff --git a/tljh/systemd.py b/tljh/systemd.py index f274fab..6bfaf1b 100644 --- a/tljh/systemd.py +++ b/tljh/systemd.py @@ -3,6 +3,7 @@ Wraps systemctl to install, uninstall, start & stop systemd services. If we use a debian package instead, we can get rid of all this code. """ + import os import subprocess diff --git a/tljh/traefik.py b/tljh/traefik.py index 4ea0d49..a19a3de 100644 --- a/tljh/traefik.py +++ b/tljh/traefik.py @@ -1,4 +1,5 @@ """Traefik installation and setup""" + import hashlib import io import logging diff --git a/tljh/user.py b/tljh/user.py index f5ed4ca..b03903f 100644 --- a/tljh/user.py +++ b/tljh/user.py @@ -3,6 +3,7 @@ User management for tljh. Supports minimal user & group management """ + import grp import pwd import subprocess diff --git a/tljh/utils.py b/tljh/utils.py index 8ab1ca8..fceec70 100644 --- a/tljh/utils.py +++ b/tljh/utils.py @@ -1,6 +1,7 @@ """ Miscellaneous functions useful in at least two places unrelated to each other """ + import logging import re import subprocess diff --git a/tljh/yaml.py b/tljh/yaml.py index e51381e..daff06b 100644 --- a/tljh/yaml.py +++ b/tljh/yaml.py @@ -3,6 +3,7 @@ ensures the same yaml settings for reading/writing throughout tljh """ + from ruamel.yaml import YAML from ruamel.yaml.composer import Composer