{"action":"opened","issue":{"url":"https://api.github.com/repos/agronholm/sphinx-autodoc-typehints/issues/48","repository_url":"https://api.github.com/repos/agronholm/sphinx-autodoc-typehints","labels_url":"https://api.github.com/repos/agronholm/sphinx-autodoc-typehints/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/agronholm/sphinx-autodoc-typehints/issues/48/comments","events_url":"https://api.github.com/repos/agronholm/sphinx-autodoc-typehints/issues/48/events","html_url":"https://github.com/agronholm/sphinx-autodoc-typehints/issues/48","id":340648243,"node_id":"MDU6SXNzdWUzNDA2NDgyNDM=","number":48,"title":"Also annotate parameter defaults.","user":{"login":"flying-sheep","id":291575,"node_id":"MDQ6VXNlcjI5MTU3NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291575?v=4","gravatar_id":"","url":"https://api.github.com/users/flying-sheep","html_url":"https://github.com/flying-sheep","followers_url":"https://api.github.com/users/flying-sheep/followers","following_url":"https://api.github.com/users/flying-sheep/following{/other_user}","gists_url":"https://api.github.com/users/flying-sheep/gists{/gist_id}","starred_url":"https://api.github.com/users/flying-sheep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flying-sheep/subscriptions","organizations_url":"https://api.github.com/users/flying-sheep/orgs","repos_url":"https://api.github.com/users/flying-sheep/repos","events_url":"https://api.github.com/users/flying-sheep/events{/privacy}","received_events_url":"https://api.github.com/users/flying-sheep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T13:54:05Z","updated_at":"2018-07-12T13:54:05Z","closed_at":null,"author_association":"NONE","body":"In numpy docstrings I often see\r\n\r\n```rst\r\nParameters\r\n----------\r\nmyparam : `Type`, optional (default: `None`)\r\n    My param does things.\r\n```\r\n\r\nI prefer styling the parameter docs as definition list like numpydoc, where there is enough space for type and defaults:\r\n\r\n<blockquote>\r\n<dl>\r\n<dt><strong>myparam</strong>: <code>Type</code>, optional (default: <code>None</code></dt>\r\n<dd>My param does things.</dd>\r\n</dl>\r\n</blockquote>\r\n\r\nHowever, the defaults get lost when migrating to sphinx-autodoc-typehints. I know the defaults are in the signature, but for long signatures, it would be best to also have them in the param docs.\r\n\r\nIt would be best would to parse and use the code for the defaults from the source, but using `repr` to get OK representations for most defaults would also be OK."}}
{"actor":{"display_login":"flying-sheep"}}