Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_version():
test_suite='tests',
install_requires=[
'GitPython>=2.1.1,<3',
'pylint>=1.6.5,<1.7',
'pylint>=1.7.1,<1.8',
'six>=1.10.0,<2',
'typing>=3.5.3.0,<4',
'autopep8>=1.2.2,<2',
Expand Down
4 changes: 2 additions & 2 deletions shopify_python/google_styleguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def __import_modules_only(self, node): # type: (astroid.ImportFrom) -> None
args = {'child': child_module}
try:
parent.import_module(child_module)
except astroid.exceptions.AstroidBuildingException as building_exception:
if str(building_exception).startswith('Unable to load module'):
except astroid.exceptions.AstroidImportError as building_exception:
if str(building_exception).startswith('Failed to import module'):
self.add_message('import-modules-only', node=node, args=args)
else:
raise
Expand Down
2 changes: 1 addition & 1 deletion shopify_python/shopify_styleguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def process_tokens(self, tokens):
def get_name(code):
try:
return self.linter.msgs_store.get_msg_display_string(code)
except pylint.utils.UnknownMessage:
except pylint.utils.UnknownMessageError:
return 'unknown'

matches = self.RE_PYLINT_DISABLE.match(string)
Expand Down
2 changes: 1 addition & 1 deletion tests/shopify_python/test_google_styleguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def assert_adds_code_messages(self, codes, *messages):
msg = ('Expected messages did not match actual.\n'
'Expected:\n%s\nGot:\n%s' % ('\n'.join(repr(m) for m in messages),
'\n'.join(repr(m) for m in got)))
self.assertEqual(list(messages), got, msg)
assert list(messages) == got, msg

def test_importing_function_fails(self):
root = astroid.builder.parse("""
Expand Down