summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-01-11 20:46:46 +0200
committercpopa <devnull@localhost>2014-01-11 20:46:46 +0200
commitdb15b4c93edacb2e53e880805c43f44b721e5c29 (patch)
treed5acf685359ab25392cd3f8b3c9a62c7f8f06154
parentee223a505ea9d2a71e9868c4b391c865008d45f5 (diff)
downloadpylint-db15b4c93edacb2e53e880805c43f44b721e5c29.tar.gz
Mark `file` as a bad function when using python 2, closes #8.
-rw-r--r--ChangeLog2
-rw-r--r--checkers/base.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fafcf93..7ccbad9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@ ChangeLog for Pylint
without being a dict or a dict subclass) or an instance which implements
__reversed__.
+ * Mark `file` as a bad function when using python2 (closes #8).
+
2013-12-22 -- 1.1.0
* Add new check for use of deprecated pragma directives "pylint:disable-msg"
diff --git a/checkers/base.py b/checkers/base.py
index cf4304c..55e5f36 100644
--- a/checkers/base.py
+++ b/checkers/base.py
@@ -55,6 +55,7 @@ REVERSED_METHODS = (('__getitem__', '__len__'),
BAD_FUNCTIONS = ['map', 'filter', 'apply']
if sys.version_info < (3, 0):
BAD_FUNCTIONS.append('input')
+ BAD_FUNCTIONS.append('file')
del re