{"action":"created","issue":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/968","repository_url":"https://api.github.com/repos/PyCQA/pylint","labels_url":"https://api.github.com/repos/PyCQA/pylint/issues/968/labels{/name}","comments_url":"https://api.github.com/repos/PyCQA/pylint/issues/968/comments","events_url":"https://api.github.com/repos/PyCQA/pylint/issues/968/events","html_url":"https://github.com/PyCQA/pylint/issues/968","id":163282807,"number":968,"title":"[IMPROVEMENT] ungrouped-isinstances: Use isinstance(value, (class1, class2)) instead of isinstance(value, class1) or isinstance(value, class2)","user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-30T22:43:47Z","updated_at":"2016-07-01T00:46:33Z","closed_at":"2016-06-30T23:48:28Z","body":"I wish create a new checker to avoid a ungrouped isinstance.\r\n\r\nE.g.\r\n```python\r\n# bad\r\nif isinstance(value, class1) or isinstance(value, class2):\r\n   pass\r\n\r\n# good\r\nif isinstance(value, (class1, class2)):\r\n    pass\r\n```\r\n\r\n\r\nThe question is: Is a good approach to pylint project or I should create it from my own project extensions?"},"comment":{"url":"https://api.github.com/repos/PyCQA/pylint/issues/comments/229827334","html_url":"https://github.com/PyCQA/pylint/issues/968#issuecomment-229827334","issue_url":"https://api.github.com/repos/PyCQA/pylint/issues/968","id":229827334,"user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T00:46:33Z","updated_at":"2016-07-01T00:46:33Z","body":"> Is this pattern of checking with more than two classes that common?\r\n\r\nWe could take pylint examples like as a sample:\r\n\r\nGrouped cases:\r\n[pylint/checkers/base.py#L102-L103](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L102-L103)\r\n[pylint/checkers/base.py#L113](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L113)\r\n[pylint/checkers/base.py#L398](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L398)\r\n[pylint/checkers/base.py#L566](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L566)\r\n[pylint/checkers/base.py#L582](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L582)\r\n[pylint/checkers/base.py#L586](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L586)\r\n[pylint/checkers/base.py#L777](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L777)\r\n[pylint/checkers/base.py#L793](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L793)\r\n[pylint/checkers/base.py#L891](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L891)\r\n\r\n\r\nNot grouped cases:\r\n[pylint/checkers/base.py#L186-L187](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/base.py#L186-L187)\r\n[pylint/checkers/utils.py#L247-L249](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/utils.py#L247-L249)\r\n[pylint/checkers/variables.py#L464-L465](https://github.com/PyCQA/pylint/blob/5d40a07684be7ed6dbaa54e49c3d436005a533bf/pylint/checkers/variables.py#L464-L465)\r\n\r\nDo you agree if I create the PR like as `extensions`?"}}
{"actor":{"display_login":"moylop260"}}