diff options
author | mihai_stan <devnull@localhost> | 2015-02-05 15:52:50 +0200 |
---|---|---|
committer | mihai_stan <devnull@localhost> | 2015-02-05 15:52:50 +0200 |
commit | f2cde1f92acf660c178a17f7c774b4061e7771b8 (patch) | |
tree | 0c21a54cf923047533c3007a7cab3ff562981f02 | |
parent | 2e1f5afab2497baf2a9e1fe47fed62482da3cfcc (diff) | |
download | pylint-f2cde1f92acf660c178a17f7c774b4061e7771b8.tar.gz |
Treat nulls as separators
-rw-r--r-- | checkers/spelling.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/checkers/spelling.py b/checkers/spelling.py index 6cc604a..c716ff2 100644 --- a/checkers/spelling.py +++ b/checkers/spelling.py @@ -131,6 +131,8 @@ class SpellingChecker(BaseTokenChecker): line2 = re.sub("([^a-zA-Z]|^)'", " ", line2) # Replace punctuation signs with space e.g. and/or -> and or line2 = self.punctuation_regex.sub(' ', line2) + # Replace null bytes with space + line2 = line2.replace('\x00', ' ') words = [] for word in line2.split(): |