Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #653

Merged
merged 6 commits into from Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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