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

🔧 Update pre-commit hooks #812

Merged
merged 4 commits into from
Sep 20, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.11.1
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -31,22 +31,22 @@ repos:
- id: isort

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

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.5.1
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
additional_dependencies:
- sphinx~=5.0
- sphinx~=6.0
- types-urllib3
- markdown-it-py~=3.0
- mdit-py-plugins~=0.4.0
Expand Down
2 changes: 1 addition & 1 deletion myst_parser/mdit_to_docutils/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ def render_dl(self, token: SyntaxTreeNode) -> None:
None, # type: ignore
term.source,
term.line,
node_id=None, # type: ignore
node_id=None,
document=self.document,
)
self.current_node.append(term)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ no_lines_before = "LOCALFOLDER"
[tool.ruff]
line-length = 100
extend-select = ["B0", "C4", "ICN", "ISC", "N", "RUF", "SIM"]
extend-ignore = ["RUF005"]
extend-ignore = ["RUF005", "RUF012"]

[tool.mypy]
show_error_codes = true
Expand Down
2 changes: 1 addition & 1 deletion tests/test_renderers/test_fixtures_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_sphinx_directives(file_params, sphinx_doctree_no_tr: CreateDoctree):
# see https://github.com/executablebooks/MyST-Parser/issues/522
if sys.maxsize == 2147483647:
pformat = pformat.replace('"2147483647"', '"9223372036854775807"')
# changed in sphinx 7.2
# changed in sphinx 7.1 (but fixed in 7.2)
pformat = pformat.replace(
'classes="sig sig-object sig sig-object"', 'classes="sig sig-object"'
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sphinx/test_sphinx_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def test_fieldlist_extension(
'classes="n n"': 'classes="n"',
# changed in sphinx 7.2 for desc_parameterlist node
'multi_line_parameter_list="False" ': "",
# changed in sphinx 7.2 for desc_signature/desc_name nodes
# changed in sphinx 7.1 (but fixed in 7.2) for desc_signature/desc_name nodes
'classes="sig sig-object sig sig-object"': 'classes="sig sig-object"',
'classes="sig-name descname sig-name descname"': 'classes="sig-name descname"',
# changed in sphinx 7.2 (#11533)
Expand Down