Skip to content

Commit 64161a8

Browse files
authored
Merge pull request #16 from michael-k/import-error
Import exception from pylint.exceptions instead of utils
2 parents 43fde21 + 43e8347 commit 64161a8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pylint_plugin_utils/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import sys
2-
try:
3-
from pylint.utils import UnknownMessage
4-
except ImportError:
5-
from pylint.utils import UnknownMessageError as UnknownMessage
2+
3+
from pylint.exceptions import UnknownMessageError
64

75

86
def get_class(module_name, kls):
@@ -137,7 +135,7 @@ def get_message_definitions(message_id_or_symbol):
137135
for pylint_message in pylint_messages
138136
for symbol in (pylint_message.msgid, pylint_message.symbol)
139137
if symbol is not None]
140-
except UnknownMessage:
138+
except UnknownMessageError:
141139
# This can happen due to mismatches of pylint versions and plugin expectations of available messages
142140
symbols = [message_id_or_symbol]
143141

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author_email='code@landscape.io',
2525
description=_short_description,
2626
version=_version,
27-
install_requires=['pylint'],
27+
install_requires=['pylint>=1.7'],
2828
packages=_packages,
2929
license='GPLv2',
3030
classifiers=_classifiers,

0 commit comments

Comments
 (0)