Title: bug: Closing parenthesis missing for PEP 695 type parameters with docstring_section_style: list · Issue #349 · mkdocstrings/python · GitHub
Open Graph Title: bug: Closing parenthesis missing for PEP 695 type parameters with docstring_section_style: list · Issue #349 · mkdocstrings/python
X Title: bug: Closing parenthesis missing for PEP 695 type parameters with docstring_section_style: list · Issue #349 · mkdocstrings/python
Description: Description of the bug When a PEP 695 generic class has a Type parameters: docstring section and docstring_section_style is set to list, the closing parenthesis after each type parameter's bound is missing from the rendered page. The out...
Open Graph Description: Description of the bug When a PEP 695 generic class has a Type parameters: docstring section and docstring_section_style is set to list, the closing parenthesis after each type parameter's bound is...
X Description: Description of the bug When a PEP 695 generic class has a Type parameters: docstring section and docstring_section_style is set to list, the closing parenthesis after each type parameter's boun...
Opengraph URL: https://github.com/mkdocstrings/python/issues/349
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: Closing parenthesis missing for PEP 695 type parameters with docstring_section_style: list","articleBody":"### Description of the bug\n\nWhen a PEP 695 generic class has a `Type parameters:` docstring section and `docstring_section_style` is set to `list`, the closing parenthesis after each type parameter's bound is missing from the rendered page. \n\nThe output is `TId (Hashable – Type of the entity identifier.` instead of `TId (Hashable) – Type of the entity identifier.`. The generated HTML also does not contain the `)`. Switching to `docstring_section_style: table` renders all three type parameters correctly, so the bug appears to be in the `list` section template.\n\n### To Reproduce\n\nConfiguration (`mkdocs.yml`):\n\n```yaml\nplugins:\n - mkdocstrings:\n handlers:\n python:\n options:\n docstring_style: google\n docstring_section_style: list\n show_signature: true\n show_signature_annotations: true\n```\n\nModule:\n\n```python\nclass Entity[TId: Hashable, M: Snapshot, S: State]:\n \"\"\"An entity.\n\n Type parameters:\n TId (Hashable): Type of the entity identifier.\n M (Snapshot): Snapshot type returned by to_snapshot().\n S (State): Internal state type that holds internal mutable data.\n \"\"\"\n```\n\nSteps:\n\n1. Use the configuration and module above.\n2. Add `::: module.Entity` to a Markdown page.\n3. Run `mkdocs build` and open the generated page.\n4. Look at the Type parameters section. The closing `)` is missing after each bound.\n\nRemoving `griffe_typingdoc` from the extensions and renaming the heading to `Type Parameters:` do not change the output.\n\n### Full traceback\n\nNo traceback. The build completes without errors or warnings.\n\n### Expected behavior\n\nEach type parameter is shown with its bound in parentheses, for example `TId (Hashable) – Type of the entity identifier.`\n\n### Environment information\n\npython -m mkdocstrings_handlers.python._internal.debug\n- __System__: macOS-14.7.2-x86_64-...\n- __Python__: cpython 3.13.9 (.../.venv/bin/python)\n- __Environment variables__:\n- __Installed packages__:\n - `mkdocstrings-python` v2.0.10\n\nOUTPUT\n```text\nClass Type Parameters:\n\nTId (Hashable– Type of the entity identifier.\nM (Snapshot– Snapshot type returned by to_snapshot().\nS (State– Internal state type that holds internal mutable data.\n```\n\n### Additional context\n\nVersions: mkdocstrings-python 2.0.10, griffelib 2.4.1, griffe not installed. \n\nThe `table` layout output for the same class is:\n\n| Name | Bound or Constraints | Description | Default |\n| --- | --- | --- | --- |\n| TId | Hashable | Type of the entity identifier. | required |\n| M | Snapshot | Snapshot type returned by to_snapshot(). | required |\n| S | State | Internal state type that holds internal mutable data. | required |\n````_\n","author":{"url":"https://github.com/vadzimk","@type":"Person","name":"vadzimk"},"datePublished":"2026-11-11T18:08:21Z","url":"https://github.com/mkdocstrings/python/issues/349"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d1be5c86-ebfa-bc79-1963-17d2d3f7fc09 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD36:4AB34:772040:A5A5B2:6AF85AB5 |
| html-safe-nonce | 21077e5ff4ac7264faaa03f4eac5be72b31356088001f420d690d32f7d44effa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDM2OjRBQjM0Ojc3MjA0MDpBNUE1QjI6NkFGODVBQjUiLCJ2aXNpdG9yX2lkIjoiNDEwMDA4MjM4NzkzOTUxNTA2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b0fc176c8201db2b72c900d83facb65aea70f3a8e9e39509a2bed9cb8fca3533 |
| hovercard-subject-tag | issue:6334438079 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mkdocstrings/python/349/issue_layout |
| twitter:image | https://opengraph.githubassets.com/32576c117d3c989d04d1135a72c8d3bea17a8e3eddeac6a9f6cb31a9463252bf/mkdocstrings/python/issues/349 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/32576c117d3c989d04d1135a72c8d3bea17a8e3eddeac6a9f6cb31a9463252bf/mkdocstrings/python/issues/349 |
| og:image:alt | Description of the bug When a PEP 695 generic class has a Type parameters: docstring section and docstring_section_style is set to list, the closing parenthesis after each type parameter's bound is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vadzimk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| go-import | github.com/mkdocstrings/python git https://github.com/mkdocstrings/python.git |
| octolytics-dimension-user_id | 75664361 |
| octolytics-dimension-user_login | mkdocstrings |
| octolytics-dimension-repository_id | 422878404 |
| octolytics-dimension-repository_nwo | mkdocstrings/python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 422878404 |
| octolytics-dimension-repository_network_root_nwo | mkdocstrings/python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width