diff options
| author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-12-20 16:50:06 +0100 |
|---|---|---|
| committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2013-12-20 16:50:06 +0100 |
| commit | 4751e5f3a16df93637e6d56b03bd4605a70c5db4 (patch) | |
| tree | b64392bcafab2ced30d4d6c74c635a46f3df36aa | |
| parent | 505554e9d09620b39bc3e31e7a55e636c805ad6e (diff) | |
| download | pylint-4751e5f3a16df93637e6d56b03bd4605a70c5db4.tar.gz | |
`input` is not a bad function when using python3. Close #110
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | checkers/base.py | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -41,6 +41,8 @@ ChangeLog for Pylint * useless-else-on-loop not emited if there is a break in the else clause of inner loop (#117). + * don't mark `input` as a bad function when using python3 (#110). + 2013-08-06 -- 1.0.0 diff --git a/checkers/base.py b/checkers/base.py index 2bbb6f7..7aa9213 100644 --- a/checkers/base.py +++ b/checkers/base.py @@ -48,6 +48,10 @@ CLASS_ATTRIBUTE_RGX = re.compile(r'([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$') # do not require a doc string on system methods NO_REQUIRED_DOC_RGX = re.compile('__.*__') +BAD_FUNCTIONS = ['map', 'filter', 'apply'] +if sys.version_info < (3, 0): + BAD_FUNCTIONS.append('input') + del re def in_loop(node): @@ -424,7 +428,7 @@ functions, methods 'comma'} ), ('bad-functions', - {'default' : ('map', 'filter', 'apply', 'input'), + {'default' : BAD_FUNCTIONS, 'type' :'csv', 'metavar' : '<builtin function names>', 'help' : 'List of builtins function names that should not be ' 'used, separated by a comma'} |
