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

Comments

2 participants
@yash-nisar
Member

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 referenced this issue Jul 30, 2017

Merged

coalib/abstractions: Add LinterClass.py #4595

2 of 2 tasks complete

yash-nisar added a commit to yash-nisar/coala that referenced this issue Aug 2, 2017

coalib/abstractions: Add LinterClass.py
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

Introduce `isinstance(cls, LinterClass)`
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