diff options
| author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-07-17 12:17:34 +0200 |
|---|---|---|
| committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-07-17 12:17:34 +0200 |
| commit | 1c3da4794d8430166c43ff0c5ac4bf193d41cca5 (patch) | |
| tree | 1aab1973a7e4eac47ef030b397aacf7aeafa7b70 /checkers/stdlib.py | |
| parent | 59e370384002d90d38a1245f8bb1725600127311 (diff) | |
| download | pylint-git-1c3da4794d8430166c43ff0c5ac4bf193d41cca5.tar.gz | |
fix regression introduced by 7eef8a7185ba: open mode no more checked with python2
Diffstat (limited to 'checkers/stdlib.py')
| -rw-r--r-- | checkers/stdlib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/checkers/stdlib.py b/checkers/stdlib.py index 604ade8ac..89261eb17 100644 --- a/checkers/stdlib.py +++ b/checkers/stdlib.py @@ -29,8 +29,8 @@ _VALID_OPEN_MODE_REGEX = r'^(r?U|[rwa]\+?b?)$' if sys.version_info >= (3, 0): OPEN_MODULE = '_io' else: - OPEN_MODULE = '__builtins__' - + OPEN_MODULE = '__builtin__' + class OpenModeChecker(BaseChecker): __implements__ = (IAstroidChecker,) name = 'open_mode' @@ -41,7 +41,7 @@ class OpenModeChecker(BaseChecker): 'Python supports: r, w, a modes with b, +, and U options. ' 'See http://docs.python.org/2/library/functions.html#open'), } - + @utils.check_messages('W1501') def visit_callfunc(self, node): """Visit a CallFunc node.""" |
