mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
lint: Remove custom whitespace rules already enforced by Black.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
138d67e852
commit
ca0b01033d
@@ -283,14 +283,6 @@ python_rules = RuleList(
|
|||||||
"good_lines": ["def foo (self):"],
|
"good_lines": ["def foo (self):"],
|
||||||
"bad_lines": ["def foo(self: Any):"],
|
"bad_lines": ["def foo(self: Any):"],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"pattern": r"^\s+#\w",
|
|
||||||
"strip": "\n",
|
|
||||||
"exclude": {"tools/droplets/create.py"},
|
|
||||||
"description": 'Missing whitespace after "#"',
|
|
||||||
"good_lines": ["a = b # some operation", "1+2 # 3 is the result"],
|
|
||||||
"bad_lines": [" #some operation", " #not valid!!!"],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"pattern": "assertEquals[(]",
|
"pattern": "assertEquals[(]",
|
||||||
"description": "Use assertEqual, not assertEquals (which is deprecated).",
|
"description": "Use assertEqual, not assertEquals (which is deprecated).",
|
||||||
@@ -308,18 +300,6 @@ python_rules = RuleList(
|
|||||||
"foo = bar # type: ignore # explanation",
|
"foo = bar # type: ignore # explanation",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"pattern": r"\b(if|else|while)[(]",
|
|
||||||
"description": "Put a space between statements like if, else, etc. and (.",
|
|
||||||
"good_lines": ["if (1 == 2):", "while (foo == bar):"],
|
|
||||||
"bad_lines": ["if(1 == 2):", "while(foo == bar):"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pattern": ", [)]",
|
|
||||||
"description": 'Unnecessary whitespace between "," and ")"',
|
|
||||||
"good_lines": ["foo = (1, 2, 3,)", "foo(bar, 42)"],
|
|
||||||
"bad_lines": ["foo = (1, 2, 3, )"],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"pattern": r"\bsudo\b",
|
"pattern": r"\bsudo\b",
|
||||||
"include_only": {"scripts/"},
|
"include_only": {"scripts/"},
|
||||||
@@ -512,7 +492,6 @@ python_rules = RuleList(
|
|||||||
"description": 'A mock function is missing a leading "assert_"',
|
"description": 'A mock function is missing a leading "assert_"',
|
||||||
},
|
},
|
||||||
*whitespace_rules,
|
*whitespace_rules,
|
||||||
*comma_whitespace_rule,
|
|
||||||
],
|
],
|
||||||
max_length=110,
|
max_length=110,
|
||||||
shebang_rules=shebang_rules,
|
shebang_rules=shebang_rules,
|
||||||
|
|||||||
Reference in New Issue
Block a user