summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@gmail.com>2014-07-31 00:56:51 +0200
committerMichal Nowikowski <godfryd@gmail.com>2014-07-31 00:56:51 +0200
commit6bcc42573477d6520acec5465b5cc80c7fc26944 (patch)
tree1fc3c661b140d607b489b5f1b79d9e315cb20693
parent451c6032fb3d038fd77cec023050f0eb5985ae31 (diff)
downloadpylint-6bcc42573477d6520acec5465b5cc80c7fc26944.tar.gz
Fixed calling maketrans on Py3k.
-rw-r--r--checkers/spelling.py7
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"""