Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 6, 2023
1 parent 2436467 commit d56062b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions myst_parser/_docs.py
Expand Up @@ -58,7 +58,6 @@ def field_type(field):


class MystConfigDirective(_ConfigBase):

option_spec = {
"sphinx": directives.flag,
"extensions": directives.flag,
Expand All @@ -71,7 +70,6 @@ def run(self):
text = self.table_header()
count = 0
for name, value, field in config.as_triple():

if field.metadata.get("deprecated"):
continue

Expand Down
1 change: 0 additions & 1 deletion myst_parser/config/main.py
Expand Up @@ -408,7 +408,6 @@ def merge_file_level(
# validate each update
fields = {name: (value, field) for name, value, field in config.as_triple()}
for name, value in updates.items():

if name not in fields:
warning(MystWarnings.MD_TOPMATTER, f"Unknown field: {name}")
continue
Expand Down
2 changes: 0 additions & 2 deletions myst_parser/mdit_to_docutils/base.py
Expand Up @@ -311,7 +311,6 @@ def _render_finalise(self) -> None:
# Add the wordcount, generated by the ``mdit_py_plugins.wordcount_plugin``.
wordcount_metadata = self.md_env.get("wordcount", {})
if wordcount_metadata:

# save the wordcount to the sphinx BuildEnvironment metadata
if self.sphinx_env is not None:
meta = self.sphinx_env.metadata.setdefault(self.sphinx_env.docname, {})
Expand Down Expand Up @@ -1141,7 +1140,6 @@ def dict_to_fm_field_list(
return field_list

def render_table(self, token: SyntaxTreeNode) -> None:

# markdown-it table always contains at least a header:
assert token.children
header = token.children[0]
Expand Down
1 change: 0 additions & 1 deletion myst_parser/mdit_to_docutils/html_to_nodes.py
Expand Up @@ -82,7 +82,6 @@ def html_to_nodes(

nodes_list = []
for child in root:

if child.name == "img":
if "src" not in child.attrs:
return [
Expand Down
1 change: 0 additions & 1 deletion myst_parser/mocking.py
Expand Up @@ -343,7 +343,6 @@ def __init__(
self.lineno = lineno

def run(self) -> list[nodes.Element]:

from docutils.parsers.rst.directives.body import CodeBlock, NumberLines

if not self.document.settings.file_insertion_enabled:
Expand Down
1 change: 0 additions & 1 deletion tests/test_sphinx/conftest.py
Expand Up @@ -65,7 +65,6 @@ def read(
regress_ext=".html",
replace=None,
):

outpath = path(os.path.join(str(app.srcdir), "_build", buildername, filename))
if not outpath.exists():
raise OSError(f"no output file exists: {outpath}")
Expand Down

0 comments on commit d56062b

Please sign in to comment.