mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Fix formatting according to newest black release
This commit is contained in:
parent
310dbe968a
commit
7ed49e4716
@ -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")
|
||||
|
@ -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):
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user