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:
parent
50e9d0df51
commit
57e3f40100
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue