Title: bug: overloads_only does not work with merge_init_into_class: true · Issue #308 · mkdocstrings/python · GitHub
Open Graph Title: bug: overloads_only does not work with merge_init_into_class: true · Issue #308 · mkdocstrings/python
X Title: bug: overloads_only does not work with merge_init_into_class: true · Issue #308 · mkdocstrings/python
Description: Description of the bug Using the new overloads_only: true option introduced in #286 does not work for __init__ functions when merge_init_into_class: true is set. To Reproduce Options: overloads_only: true show_overloads: true separate_si...
Open Graph Description: Description of the bug Using the new overloads_only: true option introduced in #286 does not work for __init__ functions when merge_init_into_class: true is set. To Reproduce Options: overloads_onl...
X Description: Description of the bug Using the new overloads_only: true option introduced in #286 does not work for __init__ functions when merge_init_into_class: true is set. To Reproduce Options: overloads_onl...
Opengraph URL: https://github.com/mkdocstrings/python/issues/308
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: overloads_only does not work with merge_init_into_class: true","articleBody":"### Description of the bug\n\u003c!-- Please provide a clear and concise description of what the bug is. --\u003e\nUsing the new `overloads_only: true` option introduced in #286 does not work for `__init__` functions when `merge_init_into_class: true` is set.\n\n### To Reproduce\n\nOptions:\n\n```yaml\noverloads_only: true\nshow_overloads: true\nseparate_signature: true\nmerge_init_into_class: true\n```\n\nPython:\n```py\nfrom typing import overload\n\nclass Class:\n @overload\n def __init__(self, a: int, b: str): ...\n @overload\n def __init__(self, a: str, b: int): ...\n def __init__(self, a: int | str, b: int | str):\n \"\"\"Some docstring.\"\"\"\n```\n \n#### MRE\n\n``` bash\ngit clone https://github.com/markuspi/mkdocstrings-python-bug-demo\ncd mkdocstrings-python-bug-demo\nuv run mkdocs serve\n```\n\n### Expected behavior\n\u003c!-- Please provide a clear and concise description of what you expected to happen. --\u003e\nThe third signature `Class(a, b)` is hidden.\n\n### Actual behavior\n\nThe third signature `Class(a, b)` is visible:\n\n\u003cimg width=\"770\" height=\"272\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/912fe1e9-3301-456c-90d9-6bd083bba850\" /\u003e\n\n### Environment information\n\u003c!-- Please run the following command in your repository and paste its output below it,\n redacting sensitive information. --\u003e\n\n- __Python__: cpython 3.13.5\n- __Environment variables__:\n- __Installed packages__:\n - `mkdocstrings-python` v1.18.0\n\n","author":{"url":"https://github.com/markuspi","@type":"Person","name":"markuspi"},"datePublished":"2025-08-28T08:26:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/308/python/issues/308"}
| 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:b64f6535-6e1b-ca0c-36ea-c4a17aba1b0f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE38:258BE8:21986E1:2C61926:696B0D58 |
| html-safe-nonce | 35cd64c4b538e63d2de9315d27fb048824ad00c2431c4b594f4df5884de4c41e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTM4OjI1OEJFODoyMTk4NkUxOjJDNjE5MjY6Njk2QjBENTgiLCJ2aXNpdG9yX2lkIjoiMTU1ODM0MjY3NjUzODY1ODEzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 80fd98d5a5f1550bb3b96b75d1192a47ee9dccb0c3f6fb50c4a9a403e6b0cf7a |
| hovercard-subject-tag | issue:3362355834 |
| 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/308/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f22f229a14064485741432eda41b75dd1006634cd43964a64023c6f332538c96/mkdocstrings/python/issues/308 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f22f229a14064485741432eda41b75dd1006634cd43964a64023c6f332538c96/mkdocstrings/python/issues/308 |
| og:image:alt | Description of the bug Using the new overloads_only: true option introduced in #286 does not work for __init__ functions when merge_init_into_class: true is set. To Reproduce Options: overloads_onl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markuspi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width