Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#653)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
  • Loading branch information
pre-commit-ci[bot] and chrisjsewell committed Mar 1, 2023
1 parent bcfd1a7 commit 8bf2522
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -31,18 +31,17 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.218
rev: v0.0.252
hooks:
- id: ruff
args: ["--force-exclude"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.0.1
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
Expand Down
1 change: 1 addition & 0 deletions docs/syntax/examples/example.py
@@ -1,5 +1,6 @@
"""An example Python file."""


# start example
class MyClass:
"""An example class."""
Expand Down
1 change: 0 additions & 1 deletion myst_parser/config/main.py
Expand Up @@ -513,7 +513,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 @@ -299,7 +299,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 @@ -1334,7 +1333,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 myst_parser/parsers/docutils_.py
Expand Up @@ -329,7 +329,6 @@ def stylesheet_call(self, *args, **kwargs):


class SimpleWriter(Writer):

settings_spec = filter_settings_spec(
Writer.settings_spec,
"template",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -111,6 +111,7 @@ no_lines_before = "LOCALFOLDER"
[tool.ruff]
line-length = 100
extend-select = ["B0", "C4", "ICN", "ISC", "N", "RUF", "SIM"]
extend-ignore = ["RUF005"]

[tool.mypy]
show_error_codes = true
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 8bf2522

Please sign in to comment.