mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
linter: Catch all malformatted string formatting clauses.
This also catches code like `"foo%s"%('bar')`, whereas before,
the first tuple entry could not be a string.
This commit is contained in:
@@ -191,9 +191,9 @@ def build_custom_checkers(by_lang):
|
||||
python_rules = cast(RuleList, [
|
||||
{'pattern': '^(?!#)@login_required',
|
||||
'description': '@login_required is unsupported; use @zulip_login_required'},
|
||||
{'pattern': '".*"%\([a-z_].*\)?$',
|
||||
{'pattern': '".*"%\(.*\)?$',
|
||||
'description': 'Missing space around "%"'},
|
||||
{'pattern': "'.*'%\([a-z_].*\)?$",
|
||||
{'pattern': "'.*'%\(.*\)?$",
|
||||
'exclude': set(['analytics/lib/counts.py',
|
||||
'analytics/tests/test_counts.py',
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user