{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/2258","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/2258/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/2258/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/2258/events","html_url":"https://github.com/PyCQA/pylint/issues/2258","id":338689503,"node_id":"MDU6SXNzdWUzMzg2ODk1MDM=","number":2258,"title":"Error with file named \"config.py\"","user":{"login":"adamtheturtle","id":797801,"node_id":"MDQ6VXNlcjc5NzgwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/797801?v=4","gravatar_id":"","url":"https://api.github.com/users/adamtheturtle","html_url":"https://github.com/adamtheturtle","followers_url":"https://api.github.com/users/adamtheturtle/followers","following_url":"https://api.github.com/users/adamtheturtle/following{/other_user}","gists_url":"https://api.github.com/users/adamtheturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/adamtheturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamtheturtle/subscriptions","organizations_url":"https://api.github.com/users/adamtheturtle/orgs","repos_url":"https://api.github.com/users/adamtheturtle/repos","events_url":"https://api.github.com/users/adamtheturtle/events{/privacy}","received_events_url":"https://api.github.com/users/adamtheturtle/received_events","type":"User","site_admin":false},"labels":[{"id":297274515,"node_id":"MDU6TGFiZWwyOTcyNzQ1MTU=","url":"https://api.github.com/repos/PyCQA/pylint/labels/bug","name":"bug","color":"ea9896","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-05T18:58:30Z","updated_at":"2018-07-05T22:15:30Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"An erroneous error occurs when a file is named \"config.py\".\r\n\r\n### Steps to reproduce\r\n\r\n1. Create a structure as so:\r\n\r\n```\r\n> tree pylint-experiment/\r\npylint-experiment/\r\n└── example\r\n    ├── config.py\r\n    └── foo.py\r\n```\r\n\r\n```\r\n> cat pylint-experiment/example/foo.py\r\nimport config\r\n\r\nprint(config.VARIABLE)\r\n```\r\n\r\n```\r\n> cat pylint-experiment/example/config.py\r\nVARIABLE = 1\r\n```\r\n\r\n2. `pylint --errors-only pylint-experiment/`\r\n\r\n### Current behavior\r\n\r\n```\r\n************* Module some_dir.other\r\npylint-experiment/some_dir/other.py:3:6: E1101: Module 'config' has no 'VARIABLE' member (no-member)\r\n```\r\n\r\n### Expected behavior\r\n\r\nI expect to see:\r\n\r\n```\r\n************* Module example.foo\r\npylint-experiment/example/foo.py:1:0: E0401: Unable to import 'config' (import-error)\r\n```\r\n\r\nThis is what happens if I rename `config` to `bar` and change `import config` to `import bar`.\r\n\r\n### pylint --version output\r\n\r\n```\r\npylint 2.0.0.dev2\r\nastroid 2.0.0.dev4\r\nPython 3.7.0 (default, Jun 29 2018, 20:13:13) \r\n[Clang 9.1.0 (clang-902.0.39.2)]\r\n```"},"comment":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/comments/402868569","html_url":"https://github.com/PyCQA/pylint/issues/2258#issuecomment-402868569","issue_url":"https://api.github.com/repos/PyCQA/pylint/issues/2258","id":402868569,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjg2ODU2OQ==","user":{"login":"brycepg","id":441800,"node_id":"MDQ6VXNlcjQ0MTgwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/441800?v=4","gravatar_id":"","url":"https://api.github.com/users/brycepg","html_url":"https://github.com/brycepg","followers_url":"https://api.github.com/users/brycepg/followers","following_url":"https://api.github.com/users/brycepg/following{/other_user}","gists_url":"https://api.github.com/users/brycepg/gists{/gist_id}","starred_url":"https://api.github.com/users/brycepg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brycepg/subscriptions","organizations_url":"https://api.github.com/users/brycepg/orgs","repos_url":"https://api.github.com/users/brycepg/repos","events_url":"https://api.github.com/users/brycepg/events{/privacy}","received_events_url":"https://api.github.com/users/brycepg/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T22:15:30Z","updated_at":"2018-07-05T22:15:30Z","author_association":"MEMBER","body":"if you add `__init__.py` to `example` pylint correctly recognizes it `example` as a package"}}
{"actor":{"display_login":"brycepg"}}