Skip to content

Commit 324985e

Browse files
committed
Fix linter
1 parent 0b4229d commit 324985e

2 files changed

Lines changed: 39 additions & 23 deletions

File tree

techdocs_core/core.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
"""
2-
* Copyright 2020 The Backstage Authors
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
2+
* Copyright 2020 The Backstage Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1515
"""
1616

1717
import tempfile
@@ -124,7 +124,7 @@ def on_config(self, config):
124124
"danger",
125125
"bug",
126126
"example",
127-
"quote"
127+
"quote",
128128
]
129129
}
130130
config["markdown_extensions"].append("pymdownx.blocks.details")
@@ -143,7 +143,7 @@ def on_config(self, config):
143143
{"name": "details-danger", "class": "danger"},
144144
{"name": "details-bug", "class": "bug"},
145145
{"name": "details-example", "class": "example"},
146-
{"name": "details-quote", "class": "quote"}
146+
{"name": "details-quote", "class": "quote"},
147147
]
148148
}
149149
config["markdown_extensions"].append("pymdownx.blocks.tab")

techdocs_core/test_core.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,22 @@ def test_pymdownx_blocks(self):
138138
)
139139
final_config = self.techdocscore.on_config(self.mkdocs_yaml_config)
140140

141-
self.assertTrue("pymdownx.blocks.admonition" in final_config["markdown_extensions"])
142-
self.assertTrue("pymdownx.blocks.details" in final_config["markdown_extensions"])
141+
self.assertTrue(
142+
"pymdownx.blocks.admonition" in final_config["markdown_extensions"]
143+
)
144+
self.assertTrue(
145+
"pymdownx.blocks.details" in final_config["markdown_extensions"]
146+
)
143147
self.assertTrue("pymdownx.blocks.tab" in final_config["markdown_extensions"])
144-
self.assertTrue("types" in final_config["mdx_configs"]["pymdownx.blocks.admonition"])
145-
self.assertTrue("types" in final_config["mdx_configs"]["pymdownx.blocks.details"])
146-
self.assertTrue("alternate_style" in final_config["mdx_configs"]["pymdownx.blocks.tab"])
148+
self.assertTrue(
149+
"types" in final_config["mdx_configs"]["pymdownx.blocks.admonition"]
150+
)
151+
self.assertTrue(
152+
"types" in final_config["mdx_configs"]["pymdownx.blocks.details"]
153+
)
154+
self.assertTrue(
155+
"alternate_style" in final_config["mdx_configs"]["pymdownx.blocks.tab"]
156+
)
147157
self.assertFalse("admonition" in final_config["markdown_extensions"])
148158
self.assertFalse("pymdownx.details" in final_config["markdown_extensions"])
149159
self.assertFalse("pymdownx.tabbed" in final_config["markdown_extensions"])
@@ -153,13 +163,19 @@ def test_default_pymdownx(self):
153163
self.plugin_collection["techdocs-core"].load_config({})
154164
final_config = self.techdocscore.on_config(self.mkdocs_yaml_config)
155165

156-
self.assertFalse("pymdownx.blocks.admonition" in final_config["markdown_extensions"])
157-
self.assertFalse("pymdownx.blocks.details" in final_config["markdown_extensions"])
166+
self.assertFalse(
167+
"pymdownx.blocks.admonition" in final_config["markdown_extensions"]
168+
)
169+
self.assertFalse(
170+
"pymdownx.blocks.details" in final_config["markdown_extensions"]
171+
)
158172
self.assertFalse("pymdownx.blocks.tab" in final_config["markdown_extensions"])
159173
self.assertFalse("pymdownx.blocks.admonition" in final_config["mdx_configs"])
160174
self.assertFalse("pymdownx.blocks.details" in final_config["mdx_configs"])
161175
self.assertFalse("pymdownx.blocks.tab" in final_config["mdx_configs"])
162176
self.assertTrue("admonition" in final_config["markdown_extensions"])
163177
self.assertTrue("pymdownx.details" in final_config["markdown_extensions"])
164178
self.assertTrue("pymdownx.tabbed" in final_config["markdown_extensions"])
165-
self.assertTrue("alternate_style" in final_config["mdx_configs"]["pymdownx.tabbed"])
179+
self.assertTrue(
180+
"alternate_style" in final_config["mdx_configs"]["pymdownx.tabbed"]
181+
)

0 commit comments

Comments
 (0)