{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/5772","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/5772/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/5772/comments","events_url":"https://api.github.com/repos/python/mypy/issues/5772/events","html_url":"https://github.com/python/mypy/issues/5772","id":369263192,"node_id":"MDU6SXNzdWUzNjkyNjMxOTI=","number":5772,"title":"Add option (if it doesn't already exist) to ignore missing type annotations","user":{"login":"kovasap","id":8763010,"node_id":"MDQ6VXNlcjg3NjMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8763010?v=4","gravatar_id":"","url":"https://api.github.com/users/kovasap","html_url":"https://github.com/kovasap","followers_url":"https://api.github.com/users/kovasap/followers","following_url":"https://api.github.com/users/kovasap/following{/other_user}","gists_url":"https://api.github.com/users/kovasap/gists{/gist_id}","starred_url":"https://api.github.com/users/kovasap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovasap/subscriptions","organizations_url":"https://api.github.com/users/kovasap/orgs","repos_url":"https://api.github.com/users/kovasap/repos","events_url":"https://api.github.com/users/kovasap/events{/privacy}","received_events_url":"https://api.github.com/users/kovasap/received_events","type":"User","site_admin":false},"labels":[{"id":21488358,"node_id":"MDU6TGFiZWwyMTQ4ODM1OA==","url":"https://api.github.com/repos/python/mypy/labels/feature","name":"feature","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-11T19:05:50Z","updated_at":"2018-10-13T00:17:21Z","closed_at":null,"author_association":"NONE","body":"I've been using type annotations in my projects mainly to make functions easier to understand/read, by making their input and output very clear.  However, I haven't been annotating the types of different variables i create, and not all my functions have type annotations.  Is it possible to have mypy ignore these cases (basically only warn me when i actually wrote an annotation AND it is incorrect)?"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/429494673","html_url":"https://github.com/python/mypy/issues/5772#issuecomment-429494673","issue_url":"https://api.github.com/repos/python/mypy/issues/5772","id":429494673,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQ5NDY3Mw==","user":{"login":"kovasap","id":8763010,"node_id":"MDQ6VXNlcjg3NjMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8763010?v=4","gravatar_id":"","url":"https://api.github.com/users/kovasap","html_url":"https://github.com/kovasap","followers_url":"https://api.github.com/users/kovasap/followers","following_url":"https://api.github.com/users/kovasap/following{/other_user}","gists_url":"https://api.github.com/users/kovasap/gists{/gist_id}","starred_url":"https://api.github.com/users/kovasap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovasap/subscriptions","organizations_url":"https://api.github.com/users/kovasap/orgs","repos_url":"https://api.github.com/users/kovasap/repos","events_url":"https://api.github.com/users/kovasap/events{/privacy}","received_events_url":"https://api.github.com/users/kovasap/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T00:17:21Z","updated_at":"2018-10-13T00:17:21Z","author_association":"NONE","body":"Sorry for the vague response!  Here is a concrete example of my question:\r\n\r\n```\r\nfrom typing import Dict, Iterable\r\n\r\ndef func(arg: Dict[str, int], scale: int) -> Dict[str, int]:\r\n    d = {}\r\n    for symbol, number in arg.items():\r\n        d[symbol] += scale * number\r\n    return d\r\n```\r\n\r\nmypy returns:\r\n\r\n```\r\nmypytest.py:5: error: Need type annotation for 'd'\r\n```\r\n\r\nIn my case, I'm interested in if there is a way for mypy to ignore the fact that i didn't annotate d even thought the function signature has type annotations (if I remove them the mypy error goes away).  \r\n\r\nI think the broader question I have is really if mypy categorizes the errors it logs, and if I can filter those categories somehow.  Kind-of like how some PEP8 linters have error codes for different style violations, and you can tell them to ignore, for instance, the \"E401 multiple imports on one line\" error using a command line arg like --ignore E401.  Does this make sense with mypy?"}}
{"actor":{"display_login":"kovasap"}}