From d25bbdf57403784bd3d053f580e3c63a70c5cb0c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Sep 2016 18:38:32 -0700 Subject: [PATCH] lint: Fix missing cast causing mypy errors. --- tools/lint-all | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/lint-all b/tools/lint-all index 3517beec43..b82964d942 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -306,7 +306,7 @@ def build_custom_checkers(by_lang): 'description': 'Fix shebang line with proper call to /usr/bin/env for Bash path, change -x|-e switches' ' to set -x|set -e'}, ] + whitespace_rules[0:1] # type: RuleList - css_rules = [ + css_rules = cast(RuleList, [ {'pattern': '^[^:]*:\S[^:]*;$', 'description': "Missing whitespace after : in CSS"}, {'pattern': '[a-z]{', @@ -314,11 +314,10 @@ def build_custom_checkers(by_lang): {'pattern': '^[ ][ ][a-zA-Z0-9]', 'description': "Incorrect 2-space indentation in CSS", 'exclude': set(['static/styles/thirdparty-fonts.css']), - 'strip': '\n', - }, + 'strip': '\n',}, {'pattern': '{\w', 'description': "Missing whitespace after '{' in CSS (should be newline)."}, - ] + whitespace_rules # type: RuleList + ]) + whitespace_rules # type: RuleList handlebars_rules = whitespace_rules html_rules = whitespace_rules + [ {'pattern': 'placeholder="[^{]',