diff --git a/packages/techdocs-container/techdocs-core/src/core.py b/packages/techdocs-container/techdocs-core/src/core.py index 7e5385e9f5..c29715c283 100644 --- a/packages/techdocs-container/techdocs-core/src/core.py +++ b/packages/techdocs-container/techdocs-core/src/core.py @@ -36,7 +36,10 @@ class TechDocsCore(BasePlugin): # Theme config["theme"] = Theme( - name="material", static_templates=["techdocs_metadata.json",], + name="material", + static_templates=[ + "techdocs_metadata.json", + ], ) config["theme"].dirs.append(tempfile.gettempdir()) diff --git a/packages/techdocs-container/techdocs-core/src/test_core.py b/packages/techdocs-container/techdocs-core/src/test_core.py index 0ccdc713e6..621570356c 100644 --- a/packages/techdocs-container/techdocs-core/src/test_core.py +++ b/packages/techdocs-container/techdocs-core/src/test_core.py @@ -3,15 +3,17 @@ import mkdocs.config as config import mkdocs.plugins as plugins from .core import TechDocsCore + class DummyTechDocsCorePlugin(plugins.BasePlugin): pass + class TestTechDocsCoreConfig(unittest.TestCase): def setUp(self): self.techdocscore = TechDocsCore() self.plugin_collection = plugins.PluginCollection() plugin = DummyTechDocsCorePlugin() - self.plugin_collection['techdocs-core'] = plugin + self.plugin_collection["techdocs-core"] = plugin self.mkdocs_yaml_config = {"plugins": self.plugin_collection} def test_removes_techdocs_core_plugin_from_config(self): @@ -24,9 +26,9 @@ class TestTechDocsCoreConfig(unittest.TestCase): self.mkdocs_yaml_config["markdown_extension"].append(["toc"]) self.mkdocs_yaml_config["mdx_configs"]["toc"] = {"toc_depth": 3} final_config = self.techdocscore.on_config(self.mkdocs_yaml_config) - self.assertTrue("toc" in final_config["mdx_configs"]) - self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) - self.assertTrue("toc_depth" in final_config["mdx_configs"]["toc"]) + self.assertTrue("toc" in final_config["mdx_configs"]) + self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) + self.assertTrue("toc_depth" in final_config["mdx_configs"]["toc"]) def test_override_default_config_with_user_config(self): self.mkdocs_yaml_config["markdown_extension"] = [] @@ -34,6 +36,6 @@ class TestTechDocsCoreConfig(unittest.TestCase): self.mkdocs_yaml_config["markdown_extension"].append(["toc"]) self.mkdocs_yaml_config["mdx_configs"]["toc"] = {"permalink": False} final_config = self.techdocscore.on_config(self.mkdocs_yaml_config) - self.assertTrue("toc" in final_config["mdx_configs"]) - self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) + self.assertTrue("toc" in final_config["mdx_configs"]) + self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) self.assertFalse(final_config["mdx_configs"]["toc"]["permalink"])