mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
lint: Fix missing cast causing mypy errors.
This commit is contained in:
@@ -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'
|
'description': 'Fix shebang line with proper call to /usr/bin/env for Bash path, change -x|-e switches'
|
||||||
' to set -x|set -e'},
|
' to set -x|set -e'},
|
||||||
] + whitespace_rules[0:1] # type: RuleList
|
] + whitespace_rules[0:1] # type: RuleList
|
||||||
css_rules = [
|
css_rules = cast(RuleList, [
|
||||||
{'pattern': '^[^:]*:\S[^:]*;$',
|
{'pattern': '^[^:]*:\S[^:]*;$',
|
||||||
'description': "Missing whitespace after : in CSS"},
|
'description': "Missing whitespace after : in CSS"},
|
||||||
{'pattern': '[a-z]{',
|
{'pattern': '[a-z]{',
|
||||||
@@ -314,11 +314,10 @@ def build_custom_checkers(by_lang):
|
|||||||
{'pattern': '^[ ][ ][a-zA-Z0-9]',
|
{'pattern': '^[ ][ ][a-zA-Z0-9]',
|
||||||
'description': "Incorrect 2-space indentation in CSS",
|
'description': "Incorrect 2-space indentation in CSS",
|
||||||
'exclude': set(['static/styles/thirdparty-fonts.css']),
|
'exclude': set(['static/styles/thirdparty-fonts.css']),
|
||||||
'strip': '\n',
|
'strip': '\n',},
|
||||||
},
|
|
||||||
{'pattern': '{\w',
|
{'pattern': '{\w',
|
||||||
'description': "Missing whitespace after '{' in CSS (should be newline)."},
|
'description': "Missing whitespace after '{' in CSS (should be newline)."},
|
||||||
] + whitespace_rules # type: RuleList
|
]) + whitespace_rules # type: RuleList
|
||||||
handlebars_rules = whitespace_rules
|
handlebars_rules = whitespace_rules
|
||||||
html_rules = whitespace_rules + [
|
html_rules = whitespace_rules + [
|
||||||
{'pattern': 'placeholder="[^{]',
|
{'pattern': 'placeholder="[^{]',
|
||||||
|
|||||||
Reference in New Issue
Block a user