{"action":"created","comment":{"url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/comments/225131685","pull_request_review_id":164663001,"id":225131685,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTEzMTY4NQ==","diff_hunk":"@@ -1,7 +1,24 @@\n+import functools\n+from typing import Callable\n+\n from coincurve import PublicKey\n from keccak import sha3_256\n \n+from nekoyume.exc import InvalidMoveError\n+\n \n def get_address(public_key: PublicKey) -> str:\n     \"\"\"Derive an Ethereum-style address from the given public key.\"\"\"\n     return '0x' + sha3_256(public_key.format(False)[1:]).hexdigest()[-40:]\n+\n+\n+def ensure_block(f: Callable) -> Callable:\n+    @functools.wraps(f)\n+    def decorator(self, *args, **kwargs):\n+        try:\n+            if self.block:\n+                return f(self, *args, **kwargs)\n+        except AttributeError:\n+            raise InvalidMoveError","path":"nekoyume/util.py","position":22,"original_position":22,"commit_id":"67ed4b9fac3540e0b87ac5c575144c791e2612e7","original_commit_id":"67ed4b9fac3540e0b87ac5c575144c791e2612e7","user":{"login":"dahlia","id":12431,"node_id":"MDQ6VXNlcjEyNDMx","avatar_url":"https://avatars1.githubusercontent.com/u/12431?v=4","gravatar_id":"","url":"https://api.github.com/users/dahlia","html_url":"https://github.com/dahlia","followers_url":"https://api.github.com/users/dahlia/followers","following_url":"https://api.github.com/users/dahlia/following{/other_user}","gists_url":"https://api.github.com/users/dahlia/gists{/gist_id}","starred_url":"https://api.github.com/users/dahlia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahlia/subscriptions","organizations_url":"https://api.github.com/users/dahlia/orgs","repos_url":"https://api.github.com/users/dahlia/repos","events_url":"https://api.github.com/users/dahlia/events{/privacy}","received_events_url":"https://api.github.com/users/dahlia/received_events","type":"User","site_admin":false},"body":"Since `AttributeError` raised by `f(...)` shouldn't be caught (but only `self.block`) here, it should be like:\r\n\r\n```python\r\ntry:\r\n    block = self.block\r\nexcept AttributeError:\r\n    block = None\r\nif block:\r\n    return f(self, *args, **kwargs)\r\n```","created_at":"2018-10-15T11:36:42Z","updated_at":"2018-10-15T11:36:50Z","html_url":"https://github.com/nekoyume/nekoyume/pull/154#discussion_r225131685","pull_request_url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/comments/225131685"},"html":{"href":"https://github.com/nekoyume/nekoyume/pull/154#discussion_r225131685"},"pull_request":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154","id":222873334,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyODczMzM0","html_url":"https://github.com/nekoyume/nekoyume/pull/154","diff_url":"https://github.com/nekoyume/nekoyume/pull/154.diff","patch_url":"https://github.com/nekoyume/nekoyume/pull/154.patch","issue_url":"https://api.github.com/repos/nekoyume/nekoyume/issues/154","number":154,"state":"open","locked":false,"title":"Raise InvalidMoveError when block confirmed not yet","user":{"login":"ipdae","id":3193043,"node_id":"MDQ6VXNlcjMxOTMwNDM=","avatar_url":"https://avatars2.githubusercontent.com/u/3193043?v=4","gravatar_id":"","url":"https://api.github.com/users/ipdae","html_url":"https://github.com/ipdae","followers_url":"https://api.github.com/users/ipdae/followers","following_url":"https://api.github.com/users/ipdae/following{/other_user}","gists_url":"https://api.github.com/users/ipdae/gists{/gist_id}","starred_url":"https://api.github.com/users/ipdae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipdae/subscriptions","organizations_url":"https://api.github.com/users/ipdae/orgs","repos_url":"https://api.github.com/users/ipdae/repos","events_url":"https://api.github.com/users/ipdae/events{/privacy}","received_events_url":"https://api.github.com/users/ipdae/received_events","type":"User","site_admin":false},"body":"resolved #135 \r\nthis pr is from #137 ","created_at":"2018-10-15T11:33:18Z","updated_at":"2018-10-15T11:36:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee404b8b1fafc3f3d1d02f297ba46a66bbca11f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154/commits","review_comments_url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154/comments","review_comment_url":"https://api.github.com/repos/nekoyume/nekoyume/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nekoyume/nekoyume/issues/154/comments","statuses_url":"https://api.github.com/repos/nekoyume/nekoyume/statuses/67ed4b9fac3540e0b87ac5c575144c791e2612e7","head":{"label":"ipdae:issues-135","ref":"issues-135","sha":"67ed4b9fac3540e0b87ac5c575144c791e2612e7","user":{"login":"ipdae","id":3193043,"node_id":"MDQ6VXNlcjMxOTMwNDM=","avatar_url":"https://avatars2.githubusercontent.com/u/3193043?v=4","gravatar_id":"","url":"https://api.github.com/users/ipdae","html_url":"https://github.com/ipdae","followers_url":"https://api.github.com/users/ipdae/followers","following_url":"https://api.github.com/users/ipdae/following{/other_user}","gists_url":"https://api.github.com/users/ipdae/gists{/gist_id}","starred_url":"https://api.github.com/users/ipdae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipdae/subscriptions","organizations_url":"https://api.github.com/users/ipdae/orgs","repos_url":"https://api.github.com/users/ipdae/repos","events_url":"https://api.github.com/users/ipdae/events{/privacy}","received_events_url":"https://api.github.com/users/ipdae/received_events","type":"User","site_admin":false},"repo":{"id":144709579,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ3MDk1Nzk=","name":"nekoyume","full_name":"ipdae/nekoyume","private":false,"owner":{"login":"ipdae","id":3193043,"node_id":"MDQ6VXNlcjMxOTMwNDM=","avatar_url":"https://avatars2.githubusercontent.com/u/3193043?v=4","gravatar_id":"","url":"https://api.github.com/users/ipdae","html_url":"https://github.com/ipdae","followers_url":"https://api.github.com/users/ipdae/followers","following_url":"https://api.github.com/users/ipdae/following{/other_user}","gists_url":"https://api.github.com/users/ipdae/gists{/gist_id}","starred_url":"https://api.github.com/users/ipdae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipdae/subscriptions","organizations_url":"https://api.github.com/users/ipdae/orgs","repos_url":"https://api.github.com/users/ipdae/repos","events_url":"https://api.github.com/users/ipdae/events{/privacy}","received_events_url":"https://api.github.com/users/ipdae/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ipdae/nekoyume","description":"Decentralized MMORPG based on Dungeon World","fork":true,"url":"https://api.github.com/repos/ipdae/nekoyume","forks_url":"https://api.github.com/repos/ipdae/nekoyume/forks","keys_url":"https://api.github.com/repos/ipdae/nekoyume/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipdae/nekoyume/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipdae/nekoyume/teams","hooks_url":"https://api.github.com/repos/ipdae/nekoyume/hooks","issue_events_url":"https://api.github.com/repos/ipdae/nekoyume/issues/events{/number}","events_url":"https://api.github.com/repos/ipdae/nekoyume/events","assignees_url":"https://api.github.com/repos/ipdae/nekoyume/assignees{/user}","branches_url":"https://api.github.com/repos/ipdae/nekoyume/branches{/branch}","tags_url":"https://api.github.com/repos/ipdae/nekoyume/tags","blobs_url":"https://api.github.com/repos/ipdae/nekoyume/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipdae/nekoyume/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipdae/nekoyume/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipdae/nekoyume/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipdae/nekoyume/statuses/{sha}","languages_url":"https://api.github.com/repos/ipdae/nekoyume/languages","stargazers_url":"https://api.github.com/repos/ipdae/nekoyume/stargazers","contributors_url":"https://api.github.com/repos/ipdae/nekoyume/contributors","subscribers_url":"https://api.github.com/repos/ipdae/nekoyume/subscribers","subscription_url":"https://api.github.com/repos/ipdae/nekoyume/subscription","commits_url":"https://api.github.com/repos/ipdae/nekoyume/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipdae/nekoyume/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipdae/nekoyume/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipdae/nekoyume/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipdae/nekoyume/contents/{+path}","compare_url":"https://api.github.com/repos/ipdae/nekoyume/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipdae/nekoyume/merges","archive_url":"https://api.github.com/repos/ipdae/nekoyume/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipdae/nekoyume/downloads","issues_url":"https://api.github.com/repos/ipdae/nekoyume/issues{/number}","pulls_url":"https://api.github.com/repos/ipdae/nekoyume/pulls{/number}","milestones_url":"https://api.github.com/repos/ipdae/nekoyume/milestones{/number}","notifications_url":"https://api.github.com/repos/ipdae/nekoyume/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipdae/nekoyume/labels{/name}","releases_url":"https://api.github.com/repos/ipdae/nekoyume/releases{/id}","deployments_url":"https://api.github.com/repos/ipdae/nekoyume/deployments","created_at":"2018-08-14T11:13:15Z","updated_at":"2018-09-14T18:51:42Z","pushed_at":"2018-10-15T11:28:12Z","git_url":"git://github.com/ipdae/nekoyume.git","ssh_url":"git@github.com:ipdae/nekoyume.git","clone_url":"https://github.com/ipdae/nekoyume.git","svn_url":"https://github.com/ipdae/nekoyume","homepage":"https://nekoyu.me/","size":2572,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nekoyume:master","ref":"master","sha":"3d0e5ea5b225461f544b92a8c7b4260337149586","user":{"login":"nekoyume","id":37520657,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NTIwNjU3","avatar_url":"https://avatars0.githubusercontent.com/u/37520657?v=4","gravatar_id":"","url":"https://api.github.com/users/nekoyume","html_url":"https://github.com/nekoyume","followers_url":"https://api.github.com/users/nekoyume/followers","following_url":"https://api.github.com/users/nekoyume/following{/other_user}","gists_url":"https://api.github.com/users/nekoyume/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoyume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoyume/subscriptions","organizations_url":"https://api.github.com/users/nekoyume/orgs","repos_url":"https://api.github.com/users/nekoyume/repos","events_url":"https://api.github.com/users/nekoyume/events{/privacy}","received_events_url":"https://api.github.com/users/nekoyume/received_events","type":"Organization","site_admin":false},"repo":{"id":125895296,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU4OTUyOTY=","name":"nekoyume","full_name":"nekoyume/nekoyume","private":false,"owner":{"login":"nekoyume","id":37520657,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NTIwNjU3","avatar_url":"https://avatars0.githubusercontent.com/u/37520657?v=4","gravatar_id":"","url":"https://api.github.com/users/nekoyume","html_url":"https://github.com/nekoyume","followers_url":"https://api.github.com/users/nekoyume/followers","following_url":"https://api.github.com/users/nekoyume/following{/other_user}","gists_url":"https://api.github.com/users/nekoyume/gists{/gist_id}","starred_url":"https://api.github.com/users/nekoyume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekoyume/subscriptions","organizations_url":"https://api.github.com/users/nekoyume/orgs","repos_url":"https://api.github.com/users/nekoyume/repos","events_url":"https://api.github.com/users/nekoyume/events{/privacy}","received_events_url":"https://api.github.com/users/nekoyume/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nekoyume/nekoyume","description":"Decentralized MMORPG based on Dungeon World","fork":false,"url":"https://api.github.com/repos/nekoyume/nekoyume","forks_url":"https://api.github.com/repos/nekoyume/nekoyume/forks","keys_url":"https://api.github.com/repos/nekoyume/nekoyume/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nekoyume/nekoyume/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nekoyume/nekoyume/teams","hooks_url":"https://api.github.com/repos/nekoyume/nekoyume/hooks","issue_events_url":"https://api.github.com/repos/nekoyume/nekoyume/issues/events{/number}","events_url":"https://api.github.com/repos/nekoyume/nekoyume/events","assignees_url":"https://api.github.com/repos/nekoyume/nekoyume/assignees{/user}","branches_url":"https://api.github.com/repos/nekoyume/nekoyume/branches{/branch}","tags_url":"https://api.github.com/repos/nekoyume/nekoyume/tags","blobs_url":"https://api.github.com/repos/nekoyume/nekoyume/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nekoyume/nekoyume/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nekoyume/nekoyume/git/refs{/sha}","trees_url":"https://api.github.com/repos/nekoyume/nekoyume/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nekoyume/nekoyume/statuses/{sha}","languages_url":"https://api.github.com/repos/nekoyume/nekoyume/languages","stargazers_url":"https://api.github.com/repos/nekoyume/nekoyume/stargazers","contributors_url":"https://api.github.com/repos/nekoyume/nekoyume/contributors","subscribers_url":"https://api.github.com/repos/nekoyume/nekoyume/subscribers","subscription_url":"https://api.github.com/repos/nekoyume/nekoyume/subscription","commits_url":"https://api.github.com/repos/nekoyume/nekoyume/commits{/sha}","git_commits_url":"https://api.github.com/repos/nekoyume/nekoyume/git/commits{/sha}","comments_url":"https://api.github.com/repos/nekoyume/nekoyume/comments{/number}","issue_comment_url":"https://api.github.com/repos/nekoyume/nekoyume/issues/comments{/number}","contents_url":"https://api.github.com/repos/nekoyume/nekoyume/contents/{+path}","compare_url":"https://api.github.com/repos/nekoyume/nekoyume/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nekoyume/nekoyume/merges","archive_url":"https://api.github.com/repos/nekoyume/nekoyume/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nekoyume/nekoyume/downloads","issues_url":"https://api.github.com/repos/nekoyume/nekoyume/issues{/number}","pulls_url":"https://api.github.com/repos/nekoyume/nekoyume/pulls{/number}","milestones_url":"https://api.github.com/repos/nekoyume/nekoyume/milestones{/number}","notifications_url":"https://api.github.com/repos/nekoyume/nekoyume/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nekoyume/nekoyume/labels{/name}","releases_url":"https://api.github.com/repos/nekoyume/nekoyume/releases{/id}","deployments_url":"https://api.github.com/repos/nekoyume/nekoyume/deployments","created_at":"2018-03-19T17:26:25Z","updated_at":"2018-10-14T11:27:51Z","pushed_at":"2018-10-15T11:33:19Z","git_url":"git://github.com/nekoyume/nekoyume.git","ssh_url":"git@github.com:nekoyume/nekoyume.git","clone_url":"https://github.com/nekoyume/nekoyume.git","svn_url":"https://github.com/nekoyume/nekoyume","homepage":"https://nekoyu.me/","size":2573,"stargazers_count":59,"watchers_count":59,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":29,"open_issues":32,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154"},"html":{"href":"https://github.com/nekoyume/nekoyume/pull/154"},"issue":{"href":"https://api.github.com/repos/nekoyume/nekoyume/issues/154"},"comments":{"href":"https://api.github.com/repos/nekoyume/nekoyume/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nekoyume/nekoyume/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/nekoyume/nekoyume/statuses/67ed4b9fac3540e0b87ac5c575144c791e2612e7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dahlia"}}