{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/170435219","pull_request_review_id":99126106,"id":170435219,"diff_hunk":"@@ -1,35 +1,40 @@\n-class MemoryDB:\n-    kv_store = None\n+from typing import TypeVar, Generic, Dict\n \n-    def __init__(self, kv_store=None):\n+K = TypeVar('K')\n+V = TypeVar('V')\n+\n+class MemoryDB(Generic[K, V]):","path":"trinity/utils/db.py","position":9,"original_position":9,"commit_id":"2dde65aa45eb05208a9364ad98a3fc9186f2a0d0","original_commit_id":"2dde65aa45eb05208a9364ad98a3fc9186f2a0d0","user":{"login":"cburgdorf","id":521109,"avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"body":"@pipermerriam @gsalgado I went all in with typings here and made this generic. Is this how you would like to have it or would you rather want this stuff to be non-generic and annotated with `object`? Personally, I'd vote for making it generic but basically because I'm a fan of Generics in other languages. I'm a bloody Python newbie and don't know about the implications that may have.","created_at":"2018-02-24T22:54:56Z","updated_at":"2018-02-24T22:54:56Z","html_url":"https://github.com/ethereum/py-evm/pull/407#discussion_r170435219","pull_request_url":"https://api.github.com/repos/ethereum/py-evm/pulls/407","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/170435219"},"html":{"href":"https://github.com/ethereum/py-evm/pull/407#discussion_r170435219"},"pull_request":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/407"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/407","id":171201728,"html_url":"https://github.com/ethereum/py-evm/pull/407","diff_url":"https://github.com/ethereum/py-evm/pull/407.diff","patch_url":"https://github.com/ethereum/py-evm/pull/407.patch","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/407","number":407,"state":"open","locked":false,"title":"WIP Type Annotations for Trinity","user":{"login":"cburgdorf","id":521109,"avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"body":"### DO NOT MERGE: THIS IS A WIP\r\n\r\nThis is an attempt to fix #386 ","created_at":"2018-02-24T22:48:57Z","updated_at":"2018-02-24T22:54:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb1b0ac34d69ecd67f3589218b3b696abf4765d5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/py-evm/pulls/407/commits","review_comments_url":"https://api.github.com/repos/ethereum/py-evm/pulls/407/comments","review_comment_url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/407/comments","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/2dde65aa45eb05208a9364ad98a3fc9186f2a0d0","head":{"label":"cburgdorf:christoph/chore/trinity-types","ref":"christoph/chore/trinity-types","sha":"2dde65aa45eb05208a9364ad98a3fc9186f2a0d0","user":{"login":"cburgdorf","id":521109,"avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"repo":{"id":122467896,"name":"py-evm","full_name":"cburgdorf/py-evm","owner":{"login":"cburgdorf","id":521109,"avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cburgdorf/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":true,"url":"https://api.github.com/repos/cburgdorf/py-evm","forks_url":"https://api.github.com/repos/cburgdorf/py-evm/forks","keys_url":"https://api.github.com/repos/cburgdorf/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cburgdorf/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cburgdorf/py-evm/teams","hooks_url":"https://api.github.com/repos/cburgdorf/py-evm/hooks","issue_events_url":"https://api.github.com/repos/cburgdorf/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/cburgdorf/py-evm/events","assignees_url":"https://api.github.com/repos/cburgdorf/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/cburgdorf/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/cburgdorf/py-evm/tags","blobs_url":"https://api.github.com/repos/cburgdorf/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cburgdorf/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cburgdorf/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/cburgdorf/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cburgdorf/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/cburgdorf/py-evm/languages","stargazers_url":"https://api.github.com/repos/cburgdorf/py-evm/stargazers","contributors_url":"https://api.github.com/repos/cburgdorf/py-evm/contributors","subscribers_url":"https://api.github.com/repos/cburgdorf/py-evm/subscribers","subscription_url":"https://api.github.com/repos/cburgdorf/py-evm/subscription","commits_url":"https://api.github.com/repos/cburgdorf/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/cburgdorf/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/cburgdorf/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/cburgdorf/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/cburgdorf/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/cburgdorf/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cburgdorf/py-evm/merges","archive_url":"https://api.github.com/repos/cburgdorf/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cburgdorf/py-evm/downloads","issues_url":"https://api.github.com/repos/cburgdorf/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/cburgdorf/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/cburgdorf/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/cburgdorf/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cburgdorf/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/cburgdorf/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/cburgdorf/py-evm/deployments","created_at":"2018-02-22T11:07:50Z","updated_at":"2018-02-22T11:07:52Z","pushed_at":"2018-02-24T22:46:58Z","git_url":"git://github.com/cburgdorf/py-evm.git","ssh_url":"git@github.com:cburgdorf/py-evm.git","clone_url":"https://github.com/cburgdorf/py-evm.git","svn_url":"https://github.com/cburgdorf/py-evm","homepage":"http://py-evm.readthedocs.io/en/latest/","size":2196,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"52c71082835580df0cac03c8568b678cdee9ee5c","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":77478378,"name":"py-evm","full_name":"ethereum/py-evm","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":false,"url":"https://api.github.com/repos/ethereum/py-evm","forks_url":"https://api.github.com/repos/ethereum/py-evm/forks","keys_url":"https://api.github.com/repos/ethereum/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/py-evm/teams","hooks_url":"https://api.github.com/repos/ethereum/py-evm/hooks","issue_events_url":"https://api.github.com/repos/ethereum/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/py-evm/events","assignees_url":"https://api.github.com/repos/ethereum/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/py-evm/tags","blobs_url":"https://api.github.com/repos/ethereum/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/py-evm/languages","stargazers_url":"https://api.github.com/repos/ethereum/py-evm/stargazers","contributors_url":"https://api.github.com/repos/ethereum/py-evm/contributors","subscribers_url":"https://api.github.com/repos/ethereum/py-evm/subscribers","subscription_url":"https://api.github.com/repos/ethereum/py-evm/subscription","commits_url":"https://api.github.com/repos/ethereum/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/py-evm/merges","archive_url":"https://api.github.com/repos/ethereum/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/py-evm/downloads","issues_url":"https://api.github.com/repos/ethereum/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/py-evm/deployments","created_at":"2016-12-27T19:36:00Z","updated_at":"2018-02-24T09:29:16Z","pushed_at":"2018-02-24T22:48:58Z","git_url":"git://github.com/ethereum/py-evm.git","ssh_url":"git@github.com:ethereum/py-evm.git","clone_url":"https://github.com/ethereum/py-evm.git","svn_url":"https://github.com/ethereum/py-evm","homepage":"http://py-evm.readthedocs.io/en/latest/","size":2199,"stargazers_count":311,"watchers_count":311,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":66,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":115,"open_issues":66,"watchers":311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/407"},"html":{"href":"https://github.com/ethereum/py-evm/pull/407"},"issue":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/407"},"comments":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/407/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/407/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/407/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/py-evm/statuses/2dde65aa45eb05208a9364ad98a3fc9186f2a0d0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cburgdorf"}}