Skip to content

Commit

Permalink
馃敡 Update pre-commit hooks (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Jun 5, 2023
1 parent bb53c05 commit fc9e9bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.4.0
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py38-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

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

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.252
rev: v0.0.270
hooks:
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
rev: v1.3.0
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
Expand Down
4 changes: 1 addition & 3 deletions myst_parser/mdit_to_docutils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,7 @@ def _restore():
if temp_root_node is not None:
# we need to temporarily set the root node,
# and we also want to restore the level_to_section mapping at the end
current_level_to_section = {
i: node for i, node in self._level_to_section.items()
}
current_level_to_section = dict(self._level_to_section.items())
current_root_node = self.md_env.get("temp_root_node", None)
self.md_env["temp_root_node"] = temp_root_node
yield
Expand Down
2 changes: 1 addition & 1 deletion myst_parser/mocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def nested_parse(
def parse_target(self, block, block_text, lineno: int):
"""
Taken from https://github.com/docutils-mirror/docutils/blob/e88c5fb08d5cdfa8b4ac1020dd6f7177778d5990/docutils/parsers/rst/states.py#L1927
""" # noqa: E501
"""
# Commenting out this code because it only applies to rST
# if block and block[-1].strip()[-1:] == "_": # possible indirect target
# reference = " ".join([line.strip() for line in block])
Expand Down

0 comments on commit fc9e9bc

Please sign in to comment.