Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Commit

Permalink
supp-lint fix #8: ignore __future__ importants
Browse files Browse the repository at this point in the history
  • Loading branch information
baverman committed Feb 20, 2012
1 parent 4d0235e commit 34ead14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions supplement/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ def visit_Import(self, node):

def visit_ImportFrom(self, node):
idx = 0
if node.module == '__future__':
return

if node.module:
idx += node.module.count('.') + 1

Expand Down
4 changes: 4 additions & 0 deletions tests/test_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,7 @@ def foo():
$result$ = lambda boo, bar: boo + bar
''')

def test_lambda_assigned_to_var():
assert_names('''
from __future__ import absolute_import
''')

0 comments on commit 34ead14

Please sign in to comment.