compatibility: Clean up linter logic for too-old client.

This commit is contained in:
Tim Abbott
2018-12-05 15:03:42 -08:00
parent 32c6b81b3a
commit 9de1bd44e2
2 changed files with 5 additions and 7 deletions

View File

@@ -499,11 +499,6 @@ def build_custom_checkers(by_lang):
'bad_lines': ['return json_error(_variable)', 'return json_error(_(variable))']},
{'pattern': r'''\Wjson_error\(['"].+[),]$''',
'exclude': set(['zerver/tests']),
'exclude_line': set([
# We don't want this string tagged for translation.
('zerver/views/compatibility.py', 'return json_error("Client is too old") # take 0'),
('zerver/views/compatibility.py', 'return json_error("Client is too old")'),
]),
'description': 'Argument to json_error should a literal string enclosed by _()'},
# To avoid JsonableError(_variable) and JsonableError(_(variable))
{'pattern': r'\WJsonableError\(_\(?\w.+\)',