Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce virtual base class for linters and use it to improve the check inside `LocalBearTestHelper` #4594

Closed
yash-nisar opened this issue Jul 30, 2017 · 0 comments
Assignees

Comments

@yash-nisar
Copy link
Member

@yash-nisar yash-nisar commented Jul 30, 2017

Instead of checking hasattr(cls, 'process_output') an isinstance(cls, Linter) is safer + easier to understand.

area/tests
type/test
difficulty/low

@yash-nisar yash-nisar mentioned this issue Jul 30, 2017
2 of 2 tasks complete
yash-nisar added a commit to yash-nisar/coala that referenced this issue Aug 2, 2017
Introduce a virtual base class for linters and use it to
improve the check inside `LocalBearTestHelper`.
i.e. Instead of checking `hasattr(cls, 'process_output')`, an
`isinstance(cls, LinterClass)` is safer and easier to understand.

Related to coala#4594
yash-nisar added a commit to yash-nisar/coala that referenced this issue Aug 2, 2017
Replace `hasattr(cls, 'process_output')` by
`isinstance(cls, LinterClass)` in `LocalBearTestHelper`.
Instead of checking `hasattr(cls, 'process_output')`, an
`isinstance(cls, LinterClass)` is safer and easier to understand.

Related to coala#4594
@rultor rultor closed this in #4595 Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.