mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Merge remote-tracking branch 'origin/master' into nightly
This commit is contained in:
commit
c9cdf293ef
@ -0,0 +1 @@
|
|||||||
|
- [Bugfix] Make sure that v0 plugin patches are applied in the same order as plugins are listed. (by @regisb)
|
@ -86,7 +86,7 @@ class PluginsTests(PluginsTestCase):
|
|||||||
plugins_v0.DictPlugin(
|
plugins_v0.DictPlugin(
|
||||||
{"name": "plugin1", "patches": {"patch1": "Hello {{ ID }}"}}
|
{"name": "plugin1", "patches": {"patch1": "Hello {{ ID }}"}}
|
||||||
)
|
)
|
||||||
plugins.load("plugin1")
|
plugins.load_all(["plugin1"])
|
||||||
patches = list(plugins.iter_patches("patch1"))
|
patches = list(plugins.iter_patches("patch1"))
|
||||||
self.assertEqual(["Hello {{ ID }}"], patches)
|
self.assertEqual(["Hello {{ ID }}"], patches)
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class BasePlugin:
|
|||||||
raise exceptions.TutorError(
|
raise exceptions.TutorError(
|
||||||
f"Invalid patch '{patch_name}' in plugin {self.name}. Expected str, got {content.__class__}."
|
f"Invalid patch '{patch_name}' in plugin {self.name}. Expected str, got {content.__class__}."
|
||||||
)
|
)
|
||||||
hooks.Filters.ENV_PATCH(patch_name).add_item(content)
|
hooks.Filters.ENV_PATCHES.add_item((patch_name, content))
|
||||||
|
|
||||||
def _load_tasks(self) -> None:
|
def _load_tasks(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user