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

Support pylint 2.0 UnknownMessage rename to UnknownMessageError #205

Closed
wants to merge 1 commit into from

Conversation

jamlamberti
Copy link

Pylint 2.0 switched to using UnknownMessageError (see commit).

This PR fixes this.

@coveralls
Copy link

coveralls commented Mar 10, 2017

Coverage Status

Coverage decreased (-0.08%) to 59.088% when pulling aee69f4 on jamlamberti:master into c893531 on landscapeio:master.

Copy link

@Spencatro Spencatro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

try:
from pylint.utils import UnknownMessage
except ImportError:
from pylint.utils import UnknownMessageError as UnknownMessage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://docs.pylint.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-1-7:

InvalidMessageError, UnknownMessage, and EmptyReport exceptions are moved to the new pylint.exceptions submodule.

So perhaps from pylint.exceptions import UnknownMessageError might be a better choice here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, the pylint.exceptions submodule is a better choice. I see that there is a #207 in now which implements it this way, and isolates the try...except logic. I will close this PR as #207 is the one that should be merged into master.

@ndcampbell
Copy link

What is the status on this? This error broke some of our CI jobs and this PR will fix it.

@jamlamberti
Copy link
Author

Closing this PR in favor of #207.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants