From 52513b30195fe0d985a64e972c1218489cae7042 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sat, 16 Apr 2022 23:59:44 +0200 Subject: Generalize E275 to require space after all keywords, not just "import". --- testsuite/E12not.py | 6 +++--- testsuite/E27.py | 5 +++++ testsuite/W19.py | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'testsuite') diff --git a/testsuite/E12not.py b/testsuite/E12not.py index 2e2366c..7677659 100644 --- a/testsuite/E12not.py +++ b/testsuite/E12not.py @@ -40,8 +40,8 @@ a = (123, if start[1] > end_col and not ( over_indent == 4 and indent_next): - return(0, "E121 continuation line over-" - "indented for visual indent") + return (0, "E121 continuation line over-" + "indented for visual indent") print "OK", ("visual", @@ -175,7 +175,7 @@ fooff(aaaa, # if bar: - return( + return ( start, 'E121 lines starting with a ' 'closing bracket should be indented ' "to match that of the opening " diff --git a/testsuite/E27.py b/testsuite/E27.py index 9bb53f8..91aa079 100644 --- a/testsuite/E27.py +++ b/testsuite/E27.py @@ -42,5 +42,10 @@ try: from importable.module import(e, f) except ImportError: pass +#: E275 +if(foo): + pass +else: + pass #: Okay matched = {"true": True, "false": False} diff --git a/testsuite/W19.py b/testsuite/W19.py index ed69e2b..9d4eb4d 100644 --- a/testsuite/W19.py +++ b/testsuite/W19.py @@ -41,8 +41,8 @@ if ( #: E101 E101 W191 W191 if start[1] > end_col and not ( over_indent == 4 and indent_next): - return(0, "E121 continuation line over-" - "indented for visual indent") + return (0, "E121 continuation line over-" + "indented for visual indent") #: #: E101 W191 @@ -58,7 +58,7 @@ if ((row < 0 or self.moduleCount <= row or raise Exception("%s,%s - %s" % (row, col, self.moduleCount)) #: E101 E101 E101 E101 W191 W191 W191 W191 W191 W191 if bar: - return( + return ( start, 'E121 lines starting with a ' 'closing bracket should be indented ' "to match that of the opening " -- cgit v1.2.1