{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/1869","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/1869/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/1869/comments","events_url":"https://api.github.com/repos/python/mypy/issues/1869/events","html_url":"https://github.com/python/mypy/issues/1869","id":165695687,"number":1869,"title":"No error for implicitly defined return value","user":{"login":"shreydesai","id":12023280,"avatar_url":"https://avatars.githubusercontent.com/u/12023280?v=3","gravatar_id":"","url":"https://api.github.com/users/shreydesai","html_url":"https://github.com/shreydesai","followers_url":"https://api.github.com/users/shreydesai/followers","following_url":"https://api.github.com/users/shreydesai/following{/other_user}","gists_url":"https://api.github.com/users/shreydesai/gists{/gist_id}","starred_url":"https://api.github.com/users/shreydesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreydesai/subscriptions","organizations_url":"https://api.github.com/users/shreydesai/orgs","repos_url":"https://api.github.com/users/shreydesai/repos","events_url":"https://api.github.com/users/shreydesai/events{/privacy}","received_events_url":"https://api.github.com/users/shreydesai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/python/mypy/labels/affects/strict-optional","name":"affects/strict-optional","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/python/mypy/milestones/6","html_url":"https://github.com/python/mypy/milestones/0.5","labels_url":"https://api.github.com/repos/python/mypy/milestones/6/labels","id":1616659,"number":6,"title":"0.5","description":"Possibly we'll declare 0.5 when we make strict optional checking the default.","creator":{"login":"ddfisher","id":245905,"avatar_url":"https://avatars.githubusercontent.com/u/245905?v=3","gravatar_id":"","url":"https://api.github.com/users/ddfisher","html_url":"https://github.com/ddfisher","followers_url":"https://api.github.com/users/ddfisher/followers","following_url":"https://api.github.com/users/ddfisher/following{/other_user}","gists_url":"https://api.github.com/users/ddfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/ddfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddfisher/subscriptions","organizations_url":"https://api.github.com/users/ddfisher/orgs","repos_url":"https://api.github.com/users/ddfisher/repos","events_url":"https://api.github.com/users/ddfisher/events{/privacy}","received_events_url":"https://api.github.com/users/ddfisher/received_events","type":"User","site_admin":false},"open_issues":88,"closed_issues":19,"state":"open","created_at":"2016-03-01T23:42:18Z","updated_at":"2016-10-05T18:49:56Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-07-15T01:55:34Z","updated_at":"2016-10-07T04:35:06Z","closed_at":null,"body":"Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would _not_ be static typing because the return value should explicitly defined (whatever it is) for statically typed languages.\r\n\r\nI think there should be a difference between these two functions when run through the parser, in that the second one should raise an error for not having an explicitly defined return value:\r\n\r\n```python\r\ndef f() -> None:\r\n    print('Hello world')\r\n\r\ndef g():\r\n    print('Hello world')\r\n```\r\n\r\nIn statically typed languages like Java, return values must be explicitly defined, whether they are `void`, `String`s, or primitive data types, for instance:\r\n```java\r\npublic void test1() {\r\n  System.out.println(\"Hello world\");\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/252150988","html_url":"https://github.com/python/mypy/issues/1869#issuecomment-252150988","issue_url":"https://api.github.com/repos/python/mypy/issues/1869","id":252150988,"user":{"login":"rwbarton","id":22628,"avatar_url":"https://avatars.githubusercontent.com/u/22628?v=3","gravatar_id":"","url":"https://api.github.com/users/rwbarton","html_url":"https://github.com/rwbarton","followers_url":"https://api.github.com/users/rwbarton/followers","following_url":"https://api.github.com/users/rwbarton/following{/other_user}","gists_url":"https://api.github.com/users/rwbarton/gists{/gist_id}","starred_url":"https://api.github.com/users/rwbarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwbarton/subscriptions","organizations_url":"https://api.github.com/users/rwbarton/orgs","repos_url":"https://api.github.com/users/rwbarton/repos","events_url":"https://api.github.com/users/rwbarton/events{/privacy}","received_events_url":"https://api.github.com/users/rwbarton/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T04:35:06Z","updated_at":"2016-10-07T04:35:06Z","body":"Perhaps the OP is more interested in something like `--disallow-untyped-defs`."}}
{"actor":{"display_login":"rwbarton"}}