Title: bug: “type”, not “typealias“ & you’re confusing “role” and “objtype” · Issue #339 · mkdocstrings/python · GitHub
Open Graph Title: bug: “type”, not “typealias“ & you’re confusing “role” and “objtype” · Issue #339 · mkdocstrings/python
X Title: bug: “type”, not “typealias“ & you’re confusing “role” and “objtype” · Issue #339 · mkdocstrings/python
Description: Description of the bug In these two spots, you should pass role="type", “typealias” is neither a role that exists nor a valid objtype python/src/mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja Line 38 in 8125b...
Open Graph Description: Description of the bug In these two spots, you should pass role="type", “typealias” is neither a role that exists nor a valid objtype python/src/mkdocstrings_handlers/python/templates/material/_bas...
X Description: Description of the bug In these two spots, you should pass role="type", “typealias” is neither a role that exists nor a valid objtype python/src/mkdocstrings_handlers/python/templates/mat...
Opengraph URL: https://github.com/mkdocstrings/python/issues/339
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: “type”, not “typealias“ & you’re confusing “role” and “objtype”","articleBody":"### Description of the bug\n\nIn these two spots, you should pass `role=\"type\"`, “typealias” is neither a role that exists nor a valid objtype\n\nhttps://github.com/mkdocstrings/python/blob/8125b0d28b039693ff05b8caac981da47eb4cd7c/src/mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja#L38\n\nhttps://github.com/mkdocstrings/python/blob/8125b0d28b039693ff05b8caac981da47eb4cd7c/src/mkdocstrings_handlers/python/templates/material/_base/type_alias.html.jinja#L86\n\nThere’s also a bigger bug in `mkdocstrings` (https://github.com/mkdocstrings/mkdocstrings/issues/826), and probably zensical: `role` != `objtype`:\n\nhttps://github.com/mkdocstrings/mkdocstrings/blob/9a11dcb8e9b39ff6e1a22abdd362350de4e68e9f/src/mkdocstrings/_internal/inventory.py#L64\n\ne.g. the role `attr` refers to objtype “attribute”,\n\n### To Reproduce\ndocument this:\n\n```py\ntype Foo = int\n```\n\nthe objects.inv you create will contain broken entries\n\n### Full traceback\nN/A\n\n### Expected behavior\n- `type` statements create `type` entries in `object.inv` (not `typealias`)\n- attributes create `attribute` entries in `objects.inv` (not `attr`, that’s the role used to refer to them)\n\n### Environment information\nv2.0.8\n\n### Additional context\nN/A\n","author":{"url":"https://github.com/flying-sheep","@type":"Person","name":"flying-sheep"},"datePublished":"2026-09-03T13:58:36Z","url":"https://github.com/mkdocstrings/python/issues/339"}
| 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:80a942a0-175e-c026-045c-7c40196689fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF78:F00AA:49AE0C:6621A4:6AF843CB |
| html-safe-nonce | 63067bf08eee4b24adb0e4c8f243de72a090a5b8b3f0e9a404497ed8c7caca21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjc4OkYwMEFBOjQ5QUUwQzo2NjIxQTQ6NkFGODQzQ0IiLCJ2aXNpdG9yX2lkIjoiODk0ODgxNTIzMjA1MDQxNDUzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cc3ef8521233006eb87c7a8be2737e609bf4caeeb0fa69d66780cc18fb8fa1a7 |
| hovercard-subject-tag | issue:5337552135 |
| 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/339/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07c90af14c903d4d96421735f6f756a4a8a6f9b9a78977e3000af4564ffe4d78/mkdocstrings/python/issues/339 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07c90af14c903d4d96421735f6f756a4a8a6f9b9a78977e3000af4564ffe4d78/mkdocstrings/python/issues/339 |
| og:image:alt | Description of the bug In these two spots, you should pass role="type", “typealias” is neither a role that exists nor a valid objtype python/src/mkdocstrings_handlers/python/templates/material/_bas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flying-sheep |
| 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