{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/py_ecc/issues/11","repository_url":"https://api.github.com/repos/ethereum/py_ecc","labels_url":"https://api.github.com/repos/ethereum/py_ecc/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/py_ecc/issues/11/comments","events_url":"https://api.github.com/repos/ethereum/py_ecc/issues/11/events","html_url":"https://github.com/ethereum/py_ecc/issues/11","id":371130102,"node_id":"MDU6SXNzdWUzNzExMzAxMDI=","number":11,"title":"Add type hinting","user":{"login":"pipermerriam","id":824194,"node_id":"MDQ6VXNlcjgyNDE5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/824194?v=4","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"labels":[{"id":1094629818,"node_id":"MDU6TGFiZWwxMDk0NjI5ODE4","url":"https://api.github.com/repos/ethereum/py_ecc/labels/Good%20First%20Issue","name":"Good First Issue","color":"3bbf76","default":false},{"id":1094628907,"node_id":"MDU6TGFiZWwxMDk0NjI4OTA3","url":"https://api.github.com/repos/ethereum/py_ecc/labels/Good%20For%20Bounty","name":"Good For Bounty","color":"8b37f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-10-17T15:15:34Z","updated_at":"2018-10-18T15:39:55Z","closed_at":null,"author_association":"MEMBER","body":"> Largely copy/pasted from https://github.com/ethereum/py-evm/issues/1398\r\n\r\n### Background\r\n\r\n[Type hints](https://www.python.org/dev/peps/pep-0484/) allow us to perform static type checking, among other things. They raise the security bar by catching bugs at development time that, without type support, may turn into runtime bugs.\r\n\r\n[This stackoverflow answer](https://stackoverflow.com/questions/32557920/what-are-type-hints-in-python-3-5/32558710#32558710) does a great job at describing their main benefits.\r\n\r\n### What is wrong?\r\n\r\nThis library currently does not have any type hints.\r\n\r\nThis needs to be fixed by:\r\n\r\n1. Adding all missing type hints.\r\n2. Enforcing (stricter) type checking in CI\r\n\r\n### How\r\n\r\nThere does exist tooling ([monkeytype](https://engineering.instagram.com/let-your-code-type-hint-itself-introducing-open-source-monkeytype-a855c7284881)) to the generation of type hints for existing code bases. From my personal experience `monkeytype` *can* be helpful but does still require manual fine tuning. Also, manually adding these type hints does serve as a great boost to the general understanding of the code base as it forces one to think about the code.\r\n\r\n1. Run `mypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics -p eth`\r\n\r\n2. Eliminate every reported error by adding the right type hint\r\n\r\nBecause this library supports older versions of python, the type hints will not be able to use the modern python3.6 syntax.\r\n\r\n### Definition of done\r\n\r\nThis issue is done when the following criteria are met:\r\n\r\n1. `mypy` is run in CI\r\n\r\nAdd a new command to the `flake8` environment in the `tox.ini` file that runs:\r\n\r\n```\r\nmypy --follow-imports=silent --warn-unused-ignores --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics -p py_ecc`\r\n```\r\n\r\n2. Usage of `type: ignore` (silencing the type checker) is minimized and there's a reasonable explanation for its usage \r\n\r\n### Stretch goals\r\n\r\nWhen this issue is done, stretch goals can be applied (and individually get funded) to tighten type support to qualify:\r\n\r\n1. `mypy --strict --follow-imports=silent --ignore-missing-imports --no-strict-optional -p py_ecc`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/py_ecc/issues/comments/431058117","html_url":"https://github.com/ethereum/py_ecc/issues/11#issuecomment-431058117","issue_url":"https://api.github.com/repos/ethereum/py_ecc/issues/11","id":431058117,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTA1ODExNw==","user":{"login":"pipermerriam","id":824194,"node_id":"MDQ6VXNlcjgyNDE5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/824194?v=4","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T15:39:54Z","updated_at":"2018-10-18T15:39:54Z","author_association":"MEMBER","body":"We generally do fixst-come-first-serve with the expectation that when there are multiple parties interested in doing a task that the work will be done *promptly* by the person claiming (loosely defined as PR open within the first 24 hours and actively working on the issue).\r\n\r\n@6ug has first dibs, followed by @iamonuwa \r\n\r\nIf the two of you (@6ug and @iamonuwa ) want to team up on this, make sure you two have a clear and public agreement on how bounty payout will work if you are both interested in the bounty)."}}
{"actor":{"display_login":"pipermerriam"}}