{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/traitlets/issues/131","labels_url":"https://api.github.com/repos/ipython/traitlets/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/ipython/traitlets/issues/131/comments","events_url":"https://api.github.com/repos/ipython/traitlets/issues/131/events","html_url":"https://github.com/ipython/traitlets/pull/131","id":117718444,"number":131,"title":"dynamically generate HasTraits `__init__` documentation","user":{"login":"rmorshea","id":4041990,"avatar_url":"https://avatars.githubusercontent.com/u/4041990?v=3","gravatar_id":"","url":"https://api.github.com/users/rmorshea","html_url":"https://github.com/rmorshea","followers_url":"https://api.github.com/users/rmorshea/followers","following_url":"https://api.github.com/users/rmorshea/following{/other_user}","gists_url":"https://api.github.com/users/rmorshea/gists{/gist_id}","starred_url":"https://api.github.com/users/rmorshea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmorshea/subscriptions","organizations_url":"https://api.github.com/users/rmorshea/orgs","repos_url":"https://api.github.com/users/rmorshea/repos","events_url":"https://api.github.com/users/rmorshea/events{/privacy}","received_events_url":"https://api.github.com/users/rmorshea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-19T01:14:26Z","updated_at":"2015-11-19T20:14:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/traitlets/pulls/131","html_url":"https://github.com/ipython/traitlets/pull/131","diff_url":"https://github.com/ipython/traitlets/pull/131.diff","patch_url":"https://github.com/ipython/traitlets/pull/131.patch"},"body":"A first go at generating `TraitType` documentation inside the `HasTraits.__init__` docstring.\r\n\r\n```python\r\nclass A(HasTraits):\r\n    i = Int()\r\n    j = Any()\r\n\r\n    def __init__(self, *args, **kwargs):\r\n        \"\"\"The constructor for the class\"\"\"\r\n        pass\r\n\r\nhelp(A().__init__)\r\n```\r\ngives:\r\n```text\r\n__init__(self, *args, **kwargs) method of __main__.A instance\r\n    The constructor for the class\r\n    \r\n    Traits of A Instances\r\n    ---------------------\r\n    i: an int\r\n    j: any value\r\n```"},"comment":{"url":"https://api.github.com/repos/ipython/traitlets/issues/comments/158184273","html_url":"https://github.com/ipython/traitlets/pull/131#issuecomment-158184273","issue_url":"https://api.github.com/repos/ipython/traitlets/issues/131","id":158184273,"user":{"login":"rmorshea","id":4041990,"avatar_url":"https://avatars.githubusercontent.com/u/4041990?v=3","gravatar_id":"","url":"https://api.github.com/users/rmorshea","html_url":"https://github.com/rmorshea","followers_url":"https://api.github.com/users/rmorshea/followers","following_url":"https://api.github.com/users/rmorshea/following{/other_user}","gists_url":"https://api.github.com/users/rmorshea/gists{/gist_id}","starred_url":"https://api.github.com/users/rmorshea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmorshea/subscriptions","organizations_url":"https://api.github.com/users/rmorshea/orgs","repos_url":"https://api.github.com/users/rmorshea/repos","events_url":"https://api.github.com/users/rmorshea/events{/privacy}","received_events_url":"https://api.github.com/users/rmorshea/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T20:14:04Z","updated_at":"2015-11-19T20:14:04Z","body":"Gotcha. In terms of doc formatting in `__init__` would it be confusing that the `trait_type` instance only exists on the class? I that with the numpy style, someone would expect `hastraits.name` would be an instance of the `trait_type` rather than something which satisfies the validation conditions for a `trait_type` instance present on the class."}}