mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
lint: Migrate typing.Text check to semgrep.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
e5779c1ca0
commit
d0d8c358b3
@@ -360,16 +360,6 @@ python_rules = RuleList(
|
||||
'bad_lines': ['desc: Optional[Text] = models.TextField()',
|
||||
'stream: Optional[Stream] = models.ForeignKey(Stream, on_delete=CASCADE)'],
|
||||
},
|
||||
{'pattern': r'[\s([]Text([^\s\w]|$)',
|
||||
'exclude': {
|
||||
# We are likely to want to keep these dirs Python 2+3 compatible,
|
||||
# since the plan includes extracting them to a separate project eventually.
|
||||
'tools/lib',
|
||||
# TODO: Update our migrations from Text->str.
|
||||
'zerver/migrations/',
|
||||
},
|
||||
'description': "Now that we're a Python 3 only codebase, we don't need to use typing.Text. Please use str instead.",
|
||||
},
|
||||
{'pattern': 'exit[(]1[)]',
|
||||
'include_only': {"/management/commands/"},
|
||||
'description': 'Raise CommandError to exit with failure in management commands',
|
||||
|
||||
Reference in New Issue
Block a user