{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/1449","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/1449/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/1449/comments","events_url":"https://api.github.com/repos/python/mypy/issues/1449/events","html_url":"https://github.com/python/mypy/issues/1449","id":151717483,"number":1449,"title":"Better documentation for dir/ and --package command line arguments","user":{"login":"JukkaL","id":1107911,"avatar_url":"https://avatars.githubusercontent.com/u/1107911?v=3","gravatar_id":"","url":"https://api.github.com/users/JukkaL","html_url":"https://github.com/JukkaL","followers_url":"https://api.github.com/users/JukkaL/followers","following_url":"https://api.github.com/users/JukkaL/following{/other_user}","gists_url":"https://api.github.com/users/JukkaL/gists{/gist_id}","starred_url":"https://api.github.com/users/JukkaL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JukkaL/subscriptions","organizations_url":"https://api.github.com/users/JukkaL/orgs","repos_url":"https://api.github.com/users/JukkaL/repos","events_url":"https://api.github.com/users/JukkaL/events{/privacy}","received_events_url":"https://api.github.com/users/JukkaL/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/python/mypy/labels/documentation","name":"documentation","color":"0b02e1"},{"url":"https://api.github.com/repos/python/mypy/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/python/mypy/milestones/3","html_url":"https://github.com/python/mypy/milestones/0.4","labels_url":"https://api.github.com/repos/python/mypy/milestones/3/labels","id":1616628,"number":3,"title":"0.4","description":"Next big feature milestone:\r\n\r\n- incremental mode\r\n- faster parser\r\n- major type variable improvements\r\n- lots of bugs closed\r\n","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":8,"closed_issues":34,"state":"open","created_at":"2016-03-01T23:15:21Z","updated_at":"2016-05-01T11:17:18Z","due_on":"2016-05-05T07:00:00Z","closed_at":null},"comments":8,"created_at":"2016-04-28T18:57:00Z","updated_at":"2016-05-01T17:50:53Z","closed_at":null,"body":"The `--help` text is confusing, and mypy docs probably don't explain these either."},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/216058523","html_url":"https://github.com/python/mypy/issues/1449#issuecomment-216058523","issue_url":"https://api.github.com/repos/python/mypy/issues/1449","id":216058523,"user":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T17:50:53Z","updated_at":"2016-05-01T17:50:53Z","body":"I think for that edge case (`pkg` has no `__init__.py`) the path of the files relative to `pkg` should be used. Here's how I derive that. Suppose the entire contents of `pkg` is `pkg/a.py` and `pkg/b.py`. Then I would like `mypy pkg` to be equivalent to `mypy pkg/a.py pkg/b.py` and for the latter the module names will be `a` and `b`. For subpackages (e.g. `pkg/subpkg` if `pkg/subpkg/__init__.py` exists) this also gives the right answer. For subdirectories (e.g. `pkg/subdir` where `pkg/subdir/__init__.py` does not exist) it would be inconvenient to flatten the structure (even though explicitly listing those files would indeed flatten it) so there I propose to deviate from the equivalence."}}