Title: bug: Typing.Overload from pyi file not showing in generated docs · Issue #182 · mkdocstrings/python · GitHub
Open Graph Title: bug: Typing.Overload from pyi file not showing in generated docs · Issue #182 · mkdocstrings/python
X Title: bug: Typing.Overload from pyi file not showing in generated docs · Issue #182 · mkdocstrings/python
Description: Description of the bug I have methods defined with @typing.overload but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. I am using the insiders version of mkdoc...
Open Graph Description: Description of the bug I have methods defined with @typing.overload but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. ...
X Description: Description of the bug I have methods defined with @typing.overload but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. ...
Opengraph URL: https://github.com/mkdocstrings/python/issues/182
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: Typing.Overload from pyi file not showing in generated docs","articleBody":"### Description of the bug\r\n\r\nI have methods defined with `@typing.overload` but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. I am using the insiders version of mkdocstring-python and griffe\r\n\r\nMy docs are generated from definitions like this in my pyi file:\r\n\r\n```python\r\n@typing.overload\r\ndef add_column(\r\n self, name: str, type: types.DataType, format: formats.DataFormat\r\n) -\u003e None:\r\n \"\"\"\r\n Add a new column to the data container\r\n \"\"\"\r\n\r\n@typing.overload\r\ndef add_column(self, name: str, type: types.HumanType) -\u003e None:\r\n \"\"\"\r\n Add a new column to the data container\r\n \"\"\"\r\n\r\n@typing.overload\r\ndef add_column(self, name: str, type: types.DataType) -\u003e None:\r\n \"\"\"\r\n Add a new column to the data container\r\n \"\"\"\r\n```\r\n\r\nNOTE: There is not any backing .py file because this is a wrapper around a c++ python module. So the mkdocstrings generation is purely going against the .pyi files.\r\n\r\n\r\n### To Reproduce\r\n\r\n.pyi file with the definitions above\r\n\r\n### Expected behavior\r\n\r\nExpect the overloaded methods to show in the docs\r\n\r\n### Environment information\r\n\r\n- __System__: Linux-6.6.31-linuxkit-aarch64-with\r\n- __Python__: cpython 3.11.9 (/usr/local/bin/python)\r\n- __Environment variables__:\r\n- __Installed packages__:\r\n - `mkdocs` v1.6.0\r\n - `mkdocstrings` v0.25.2\r\n - `mkdocstrings-python` v1.10.8.1.8.3\r\n - `griffe` v0.49.0.1.2.1.dev2+g5d4e082\r\n\r\n\r\n### Additional context\r\n\u003c!-- Add any other relevant context about the problem here,\r\n like links to other issues or pull requests, screenshots, etc.\r\n--\u003e\r\n","author":{"url":"https://github.com/nvoxland-al","@type":"Person","name":"nvoxland-al"},"datePublished":"2024-08-20T15:48:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/182/python/issues/182"}
| 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:73d771a6-11fe-bcfe-d96a-db0c1a51816c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82AC:DE287:278F440:342BD7B:696B2679 |
| html-safe-nonce | fd090e941e240c1bf30bbd426b31272e863f9d7f6d2d18ab82fed16b907c8366 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkFDOkRFMjg3OjI3OEY0NDA6MzQyQkQ3Qjo2OTZCMjY3OSIsInZpc2l0b3JfaWQiOiI4NzIxNTYyNDI2NDI0MzcwODA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2d8d1296b8a55a27b2afad2b5be8d5f6ad5b5507bdf2bd5ab8bb89ef362b93bb |
| hovercard-subject-tag | issue:2475981805 |
| 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/182/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a61e4188c31b0c5ab1dc09bc1a1f073553cc33fa23567db9e415befe6947d452/mkdocstrings/python/issues/182 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a61e4188c31b0c5ab1dc09bc1a1f073553cc33fa23567db9e415befe6947d452/mkdocstrings/python/issues/182 |
| og:image:alt | Description of the bug I have methods defined with @typing.overload but they are not showing up in the generated docs. Other methods show up fine, but not the overload ones. There are no warnings. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nvoxland-al |
| 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