style: Fix incorrect references style verifiers

The style checker for spacing around control statements (ControlSpace)
and the whitespace checker (Whitespace) didn't refer to some of their
configuration variables correctly. This changeset fixes those issues.

Reported-by: Jason Lowe-Power <power.jg@gmail.com>

--HG--
extra : amend_source : 05d82d27d4c42aacd78b514d3ca35ca5744164bb
This commit is contained in:
Andreas Sandberg 2016-07-01 15:35:52 +01:00
parent 50e9d0df51
commit 57e3f40100

View file

@ -272,7 +272,8 @@ class Whitespace(LineVerifier):
if c == ' ':
newline += ' '
elif c == '\t':
newline += ' ' * (tabsize - len(newline) % tabsize)
newline += ' ' * (style.tabsize - \
len(newline) % style.tabsize)
else:
newline += line[i:]
break
@ -349,7 +350,7 @@ class ControlSpace(LineVerifier):
return not (match and match.group(2) != " ")
def fix_line(self, line, **kwargs):
new_line = _any_control.sub(r'\1 (', line)
new_line = ControlSpace._any_control.sub(r'\1 (', line)
return new_line