Skip to content

Commit 0c14158

Browse files
committed
Merge branch 'main' into feat/allow-custom-headings-and-labels
2 parents c9f3900 + b0b813a commit 0c14158

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+90
-65
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
227227

228228
- Release Insiders features of the $500/month funding goal ([bd30106](https://github.com/mkdocstrings/python/commit/bd301061fe9c647f9b91c2c9b4baa784c304eca7) by Timothée Mazzucotelli).
229229
The features and projects related to *mkdocstrings-python* are:
230-
230+
231231
- [Cross-references for type annotations in signatures](https://mkdocstrings.github.io/python/usage/configuration/signatures/#signature_crossrefs)
232232
- [Symbol types in headings and table of contents](https://mkdocstrings.github.io/python/usage/configuration/headings/#show_symbol_type_toc)
233233
- [`griffe-inherited-docstrings`](https://mkdocstrings.github.io/griffe-inherited-docstrings/), a Griffe extension for inheriting docstrings
234234
- [`griffe2md`](https://mkdocstrings.github.io/griffe2md/), a tool to output API docs to Markdown using Griffe
235-
235+
236236
See the complete list of features and projects here:
237237
https://pawamoy.github.io/insiders/#500-plasmavac-user-guide.
238238

@@ -464,7 +464,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
464464

465465
You can see how to use the filter in this commit's changes:
466466
[f686f4e4](https://github.com/mkdocstrings/python/commit/f686f4e4599cea64686d4ef4863b507dd096a513).
467-
467+
468468
**We take this as an opportunity to go out of beta and bump the version to 1.0.0.
469469
This will allow users to rely on semantic versioning.**
470470

config/pytest.ini

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ filterwarnings =
1212
error
1313
# TODO: remove once pytest-xdist 4 is released
1414
ignore:.*rsyncdir:DeprecationWarning:xdist
15-
# TODO: remove once Griffe releases v1
16-
ignore:.*`get_logger`:DeprecationWarning:_griffe
17-
ignore:.*`name`:DeprecationWarning:_griffe
15+
ignore:.*fallback anchor function:DeprecationWarning:mkdocstrings

docs/.glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[Griffe]: https://github.com/mkdocstrings/griffe
77
[ReadTheDocs Sphinx theme]: https://sphinx-rtd-theme.readthedocs.io/en/stable/index.html
88
[Spacy's documentation]: https://spacy.io/api/doc/
9-
[Black]: https://pypi.org/project/black/
9+
[Black]: https://pypi.org/project/black/
1010
[Material for MkDocs]: https://squidfunk.github.io/mkdocs-material
1111
[Ruff]: https://docs.astral.sh/ruff
1212

docs/.overrides/main.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% extends "base.html" %}
22

33
{% block announce %}
4-
4+
55
<strong>Fund this project</strong> through
66
<a href="{{ 'insiders/#how-to-become-a-sponsor' | url }}"><strong>sponsorship</strong></a>
77
<span class="twemoji heart pulse">
88
{% include ".icons/octicons/heart-fill-16.svg" %}
99
</span> &mdash;
10-
10+
1111
Follow
1212
<strong>@pawamoy</strong> on
1313
<a rel="me" href="https://fosstodon.org/@pawamoy">

docs/.overrides/partials/comments.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2 id="__comments">Feedback</h2>
3131
: "light"
3232

3333
// Instruct Giscus to set theme
34-
giscus.setAttribute("data-theme", theme)
34+
giscus.setAttribute("data-theme", theme)
3535
}
3636

3737
// Register event handlers after documented loaded

docs/insiders/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ You can cancel your sponsorship anytime.[^5]
161161

162162
The following section lists all funding goals. Each goal contains a list of
163163
features prefixed with a checkmark symbol, denoting whether a feature is
164-
:octicons-check-circle-fill-24:{ style="color: #00e676" } already available or
164+
:octicons-check-circle-fill-24:{ style="color: #00e676" } already available or
165165
:octicons-check-circle-fill-24:{ style="color: var(--md-default-fg-color--lightest)" } planned,
166166
but not yet implemented. When the funding goal is hit,
167167
the features are released for general availability.
@@ -221,7 +221,7 @@ by the [ISC License][license]. However, we kindly ask you to respect our
221221

222222
- Please **don't distribute the source code** of Insiders. You may freely use
223223
it for public, private or commercial projects, privately fork or mirror it,
224-
but please don't make the source code public, as it would counteract the
224+
but please don't make the source code public, as it would counteract the
225225
sponsorware strategy.
226226

227227
- If you cancel your subscription, you're automatically removed as a

docs/insiders/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ Or using HTTPS:
4242
pip install git+https://${GH_TOKEN}@github.com/pawamoy-insiders/mkdocstrings-python.git
4343
```
4444

45-
>? NOTE: **How to get a GitHub personal access token**
45+
>? NOTE: **How to get a GitHub personal access token?**
4646
> The `GH_TOKEN` environment variable is a GitHub token.
4747
> It can be obtained by creating a [personal access token] for
4848
> your GitHub account. It will give you access to the Insiders repository,
4949
> programmatically, from the command line or GitHub Actions workflows:
50-
>
50+
>
5151
> 1. Go to https://github.com/settings/tokens
5252
> 2. Click on [Generate a new token]
5353
> 3. Enter a name and select the [`repo`][scopes] scope
5454
> 4. Generate the token and store it in a safe place
55-
>
55+
>
5656
> [personal access token]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
5757
> [Generate a new token]: https://github.com/settings/tokens/new
5858
> [scopes]: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps#available-scopes
59-
>
59+
>
6060
> Note that the personal access
6161
> token must be kept secret at all times, as it allows the owner to access your
6262
> private repositories.

docs/usage/configuration/general.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ plugins:
5555
////
5656
///
5757
58+
## `force_inspection`
59+
60+
- **:octicons-package-24: Type [`bool`][] :material-equal: `False`{ title="default value" }**
61+
<!-- - **:octicons-project-template-24: Template :material-null:** (contained in [`class.html`][class template]) -->
62+
63+
Whether to force inspecting modules (importing them) even if their source code is available.
64+
65+
This option is useful when you know that dynamic analysis (inspection) yields better results than static analysis. Do not use this blindly: the recommended approach is to write a Griffe extension that will improve extracted API data. See [How to selectively inspect objects](https://mkdocstrings.github.io/griffe/guide/users/how-to/selectively-inspect/).
66+
67+
```yaml title="in mkdocs.yml (global configuration)"
68+
plugins:
69+
- mkdocstrings:
70+
handlers:
71+
python:
72+
options:
73+
force_inspection: false
74+
```
75+
76+
```md title="or in docs/some_page.md (local configuration)"
77+
::: path.to.object
78+
options:
79+
force_inspection: true
80+
```
81+
5882
## `show_bases`
5983

6084
- **:octicons-package-24: Type [`bool`][] :material-equal: `True`{ title="default value" }**
@@ -250,7 +274,7 @@ plugins:
250274
::: your_package.your_module
251275
options:
252276
preload_modules:
253-
- their_package
277+
- their_package
254278
```
255279

256280
```python title="your_package/your_module.py"

docs/usage/configuration/headings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ When [grouped by categories][group_by_category], show a heading for each categor
490490
These category headings will appear in the table of contents,
491491
allowing you to link to them using their permalinks.
492492

493-
WARNING: **Not recommended with deeply nested object**
493+
WARNING: **Not recommended with deeply nested objects.**
494494
When injecting documentation for deeply nested objects,
495495
you'll quickly run out of heading levels, and the objects
496496
at the bottom of the tree risk all getting documented

docs/usage/configuration/signatures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ plugins:
202202

203203
[:octicons-heart-fill-24:{ .pulse } Sponsors only](../../insiders/index.md){ .insiders } &mdash;
204204
[:octicons-tag-24: Insiders 1.8.0](../../insiders/changelog.md#1.8.0) &mdash;
205-
**This feature also requires
205+
**This feature also requires
206206
[Griffe Insiders](https://mkdocstrings.github.io/griffe/insiders/)
207207
to be installed.**
208208

0 commit comments

Comments
 (0)