Skip to content

Commit

Permalink
Correct wrong import
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanoch committed Feb 20, 2017
1 parent 1293869 commit 3c668e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flake8_translation_activate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from sys import stdin

__version__ = '1.0'
__version__ = '1.0.1'

TRANSLATION_ACTIVATE_ERROR_CODE = 'T006'
TRANSLATION_ACTIVATE_ERROR_MESSAGE = 'call to django.translation.activate() found'
Expand Down Expand Up @@ -36,7 +36,7 @@ def run(self):
'line': node.lineno,
'col': node.col_offset,
})
if isinstance(node, ast.ImportFrom) and node.module == 'django.translation' and 'activate' in [alias.name for alias in node.names] and node.lineno not in noqa:
if isinstance(node, ast.ImportFrom) and node.module == 'django.utils.translation' and 'activate' in [alias.name for alias in node.names] and node.lineno not in noqa:
errors.append({
'message': '{0} {1}'.format(TRANSLATION_ACTIVATE_ERROR_CODE, ACTIVATE_IMPORT_ERROR_MESSAGE),
'line': node.lineno,
Expand Down

0 comments on commit 3c668e5

Please sign in to comment.