diff options
author | Michal Nowikowski <godfryd@gmail.com> | 2014-07-31 00:56:51 +0200 |
---|---|---|
committer | Michal Nowikowski <godfryd@gmail.com> | 2014-07-31 00:56:51 +0200 |
commit | 6bcc42573477d6520acec5465b5cc80c7fc26944 (patch) | |
tree | 1fc3c661b140d607b489b5f1b79d9e315cb20693 | |
parent | 451c6032fb3d038fd77cec023050f0eb5985ae31 (diff) | |
download | pylint-6bcc42573477d6520acec5465b5cc80c7fc26944.tar.gz |
Fixed calling maketrans on Py3k.
-rw-r--r-- | checkers/spelling.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/checkers/spelling.py b/checkers/spelling.py index 8a95022..773f657 100644 --- a/checkers/spelling.py +++ b/checkers/spelling.py @@ -20,6 +20,11 @@ import tokenize import string import re +if sys.version_info[0] >= 3: + maketrans = str.maketrans +else: + maketrans = string.maketrans + import astroid from pylint.interfaces import ITokenChecker, IAstroidChecker, IRawChecker @@ -44,7 +49,7 @@ else: dict_choices = [''] instr = " To make it working install python-enchant package." -table = string.maketrans("", "") +table = maketrans("", "") class SpellingChecker(BaseTokenChecker): """Check spelling in comments and docstrings""" |