From 57e3f401006567f8cfd113133a6ba2518f7ee9c2 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 1 Jul 2016 15:35:52 +0100 Subject: [PATCH] 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 --HG-- extra : amend_source : 05d82d27d4c42aacd78b514d3ca35ca5744164bb --- util/style/verifiers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/style/verifiers.py b/util/style/verifiers.py index b798f5553..8a02db1a1 100644 --- a/util/style/verifiers.py +++ b/util/style/verifiers.py @@ -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 -- 2.30.2