Skip to content

Commit 8bf2522

Browse files
[pre-commit.ci] pre-commit autoupdate (#653)
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>
1 parent bcfd1a7 commit 8bf2522

File tree

9 files changed

+5
-11
lines changed

9 files changed

+5
-11
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,17 @@ repos:
3131
- id: isort
3232

3333
- repo: https://github.com/psf/black
34-
rev: 22.12.0
34+
rev: 23.1.0
3535
hooks:
3636
- id: black
3737

3838
- repo: https://github.com/charliermarsh/ruff-pre-commit
39-
rev: v0.0.218
39+
rev: v0.0.252
4040
hooks:
4141
- id: ruff
42-
args: ["--force-exclude"]
4342

4443
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v0.991
44+
rev: v1.0.1
4645
hooks:
4746
- id: mypy
4847
args: [--config-file=pyproject.toml]

docs/syntax/examples/example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""An example Python file."""
22

3+
34
# start example
45
class MyClass:
56
"""An example class."""

myst_parser/config/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ def merge_file_level(
513513
# validate each update
514514
fields = {name: (value, field) for name, value, field in config.as_triple()}
515515
for name, value in updates.items():
516-
517516
if name not in fields:
518517
warning(MystWarnings.MD_TOPMATTER, f"Unknown field: {name}")
519518
continue

myst_parser/mdit_to_docutils/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ def _render_finalise(self) -> None:
299299
# Add the wordcount, generated by the ``mdit_py_plugins.wordcount_plugin``.
300300
wordcount_metadata = self.md_env.get("wordcount", {})
301301
if wordcount_metadata:
302-
303302
# save the wordcount to the sphinx BuildEnvironment metadata
304303
if self.sphinx_env is not None:
305304
meta = self.sphinx_env.metadata.setdefault(self.sphinx_env.docname, {})
@@ -1334,7 +1333,6 @@ def dict_to_fm_field_list(
13341333
return field_list
13351334

13361335
def render_table(self, token: SyntaxTreeNode) -> None:
1337-
13381336
# markdown-it table always contains at least a header:
13391337
assert token.children
13401338
header = token.children[0]

myst_parser/mdit_to_docutils/html_to_nodes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def html_to_nodes(
8282

8383
nodes_list = []
8484
for child in root:
85-
8685
if child.name == "img":
8786
if "src" not in child.attrs:
8887
return [

myst_parser/mocking.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ def __init__(
343343
self.lineno = lineno
344344

345345
def run(self) -> list[nodes.Element]:
346-
347346
from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
348347

349348
if not self.document.settings.file_insertion_enabled:

myst_parser/parsers/docutils_.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ def stylesheet_call(self, *args, **kwargs):
329329

330330

331331
class SimpleWriter(Writer):
332-
333332
settings_spec = filter_settings_spec(
334333
Writer.settings_spec,
335334
"template",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ no_lines_before = "LOCALFOLDER"
111111
[tool.ruff]
112112
line-length = 100
113113
extend-select = ["B0", "C4", "ICN", "ISC", "N", "RUF", "SIM"]
114+
extend-ignore = ["RUF005"]
114115

115116
[tool.mypy]
116117
show_error_codes = true

tests/test_sphinx/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def read(
6565
regress_ext=".html",
6666
replace=None,
6767
):
68-
6968
outpath = path(os.path.join(str(app.srcdir), "_build", buildername, filename))
7069
if not outpath.exists():
7170
raise OSError(f"no output file exists: {outpath}")

0 commit comments

Comments
 (0)