diff --git a/tests/test_env.py b/tests/test_env.py index 85ad8ca..2122df7 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -133,7 +133,9 @@ class EnvTests(unittest.TestCase): # Render templates with unittest.mock.patch.object( - env.plugins, "iter_enabled", return_value=[plugin1], + env.plugins, + "iter_enabled", + return_value=[plugin1], ): with tempfile.TemporaryDirectory() as root: # Render plugin templates @@ -168,7 +170,9 @@ class EnvTests(unittest.TestCase): env1 = env.Renderer.instance(config).environment with unittest.mock.patch.object( - env.plugins, "iter_enabled", return_value=[plugin1], + env.plugins, + "iter_enabled", + return_value=[plugin1], ): # Load env a second time config["PLUGINS"].append("myplugin") diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 889b5f3..19eb566 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -26,10 +26,13 @@ class PluginsTests(unittest.TestCase): with patch.object(plugins.importlib, "import_module", return_value=43): plugin2 = plugins.OfficialPlugin.load("plugin2") with patch.object( - plugins.EntrypointPlugin, "iter_installed", return_value=[plugin1], + plugins.EntrypointPlugin, + "iter_installed", + return_value=[plugin1], ): self.assertEqual( - [plugin1, plugin2], list(plugins.iter_installed()), + [plugin1, plugin2], + list(plugins.iter_installed()), ) def test_enable(self): diff --git a/tutor/commands/dev.py b/tutor/commands/dev.py index 07cc498..4a436e9 100644 --- a/tutor/commands/dev.py +++ b/tutor/commands/dev.py @@ -27,7 +27,10 @@ class DevContext(Context): if os.path.exists(override_path): args += ["-f", override_path] return utils.docker_compose( - *args, "--project-name", config["DEV_PROJECT_NAME"], *command, + *args, + "--project-name", + config["DEV_PROJECT_NAME"], + *command, ) @@ -38,7 +41,8 @@ def dev(context): @click.command( - help="Run a development server", context_settings={"ignore_unknown_options": True}, + help="Run a development server", + context_settings={"ignore_unknown_options": True}, ) @click.argument("options", nargs=-1, required=False) @click.argument("service") diff --git a/tutor/commands/k8s.py b/tutor/commands/k8s.py index 10c6d5e..9d39030 100644 --- a/tutor/commands/k8s.py +++ b/tutor/commands/k8s.py @@ -303,7 +303,10 @@ class K8sScriptRunner(scripts.BaseRunner): "\n" "Old-style job running will be deprecated soon. Please inform " "your plugin maintainer!" - ).format(job_name=job_name, command=command.replace("\n", "\n "),) + ).format( + job_name=job_name, + command=command.replace("\n", "\n "), + ) fmt.echo_alert(message) wait_for_pod_ready(self.config, service) kubectl_exec(self.config, service, command) diff --git a/tutor/commands/local.py b/tutor/commands/local.py index fa7db10..c9648e1 100644 --- a/tutor/commands/local.py +++ b/tutor/commands/local.py @@ -32,7 +32,7 @@ class LocalContext(Context): ) -@click.group(help="Run Open edX locally with docker-compose",) +@click.group(help="Run Open edX locally with docker-compose") @click.pass_context def local(context): context.obj = LocalContext(context.obj.root)