Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/pre-commit-approx-eq-4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Oct 27, 2024
2 parents af75f90 + f62025f commit 08dcbfd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ exclude: >
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.7.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.12.1
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
Expand Down
2 changes: 1 addition & 1 deletion docs/syntax/cross-referencing.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ you can then reference inventory objects by prefixing the `inv` schema to the de

`key`, `domain` and `type` are optional, e.g. for `inv:#name`, all inventories, domains and types will be searched, with a [warning emitted](myst-warnings) if multiple matches are found.

Additionally, `*` is a wildcard which matches zero or characters, e.g. `inv:*:std:doc#a*` will match all `std:doc` objects in all inventories, with a `name` beginning with `a`.
Additionally, `*` is a wildcard which matches zero or more characters, e.g. `inv:*:std:doc#a*` will match all `std:doc` objects in all inventories, with a `name` beginning with `a`.
Note, to match to a literal `*` use `\*`.

Here are some examples:
Expand Down
3 changes: 0 additions & 3 deletions docs/syntax/roles-and-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ Euler's identity, equation {math:numref}`euler`, was elected one of the
most beautiful mathematical formulas.
:::

Euler's identity, equation {math:numref}`euler`, was elected one of the
most beautiful mathematical formulas.

#### How roles parse content

The content of roles is parsed differently depending on the role that you've used.
Expand Down
4 changes: 4 additions & 0 deletions tests/test_sphinx/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def read(
# pygments 2.11.0 introduces a whitespace tag
for pygment_whitespace in doc_div.select("pre > span.w"):
pygment_whitespace.replace_with(pygment_whitespace.text)
# something changed in sphinx 8 (or new docutils) to introduce this, although I couldn't find the actual commit,
# but in any case, it's not important for the regression test
for clearer_div in doc_div.findAll("div", {"class": "clearer"}):
clearer_div.decompose()
text = doc_div.prettify()
# changed in sphinx 7.2
text = text.replace('"Link to this', '"Permalink to this')
Expand Down
2 changes: 2 additions & 0 deletions tests/test_sphinx/test_sphinx_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ def test_references_singlehtml(
# changed in sphinx 7.3
'="#document-index': '="index.html#document-index',
'="#document-other': '="index.html#document-other',
# change in sphinx 8
'href="index.html#': 'href="#',
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ <h3>
</a>
</h3>
<p>
<a class="reference internal" href="index.html#document-other/other2">
<a class="reference internal" href="#document-other/other2">
<span class="doc">
Other 2 Title
</span>
</a>
</p>
<p>
<a class="reference internal" href="index.html#document-other/other2">
<a class="reference internal" href="#document-other/other2">
<span class="doc">
Other 2 Title
</span>
</a>
</p>
<p>
<a class="reference internal" href="index.html#document-other/other2">
<a class="reference internal" href="#document-other/other2">
<span class="std std-doc">
Other 2 Title
</span>
</a>
</p>
<p>
<a class="reference internal" href="index.html#title">
<a class="reference internal" href="#title">
<span class="std std-ref">
Title
</span>
Expand All @@ -71,21 +71,21 @@ <h3>
</section>
</div>
<p>
<a class="reference internal" href="index.html#document-other/other">
<a class="reference internal" href="#document-other/other">
<span class="doc">
Other Title
</span>
</a>
</p>
<p>
<a class="reference internal" href="index.html#document-other/other">
<a class="reference internal" href="#document-other/other">
<span class="doc">
Other Title
</span>
</a>
</p>
<p>
<a class="reference internal" href="index.html#document-other/other">
<a class="reference internal" href="#document-other/other">
<span class="std std-doc">
Other Title
</span>
Expand All @@ -99,7 +99,7 @@ <h3>
</a>
</p>
<p>
<a class="reference internal" href="index.html#other-title">
<a class="reference internal" href="#other-title">
<span class="std std-ref">
Other Title
</span>
Expand Down

0 comments on commit 08dcbfd

Please sign in to comment.