mirror of https://github.com/zulip/zulip.git
edit_history: Remove `LEGACY_PREV_TOPIC` constant from code base.
Removes `LEGACY_PREV_TOPIC` which is no longer needed due to the message edit history migration. Also remove additions to the linter exclude list that were added earlier in this commit series.
This commit is contained in:
parent
e54dfda0b1
commit
58f21fc748
|
@ -12,10 +12,7 @@ from zulint.custom_rules import Rule, RuleList
|
|||
|
||||
FILES_WITH_LEGACY_SUBJECT = {
|
||||
# This basically requires a big DB migration:
|
||||
"zerver/lib/message.py",
|
||||
"zerver/lib/topic.py",
|
||||
"zerver/lib/types.py",
|
||||
"zerver/views/message_edit.py",
|
||||
# This is for backward compatibility.
|
||||
"zerver/tests/test_legacy_subject.py",
|
||||
# Other migration-related changes require extreme care.
|
||||
|
@ -232,7 +229,7 @@ python_rules = RuleList(
|
|||
rules=[
|
||||
{
|
||||
"pattern": "subject|SUBJECT",
|
||||
"exclude_pattern": "subject to the|email|outbox|edit_history_event",
|
||||
"exclude_pattern": "subject to the|email|outbox",
|
||||
"description": "avoid subject as a var",
|
||||
"good_lines": ["topic_name"],
|
||||
"bad_lines": ['subject="foo"', " MAX_SUBJECT_LEN"],
|
||||
|
|
|
@ -20,12 +20,6 @@ MATCH_TOPIC = "match_subject"
|
|||
# Prefix use to mark topic as resolved.
|
||||
RESOLVED_TOPIC_PREFIX = "✔ "
|
||||
|
||||
# This constant is actually embedded into
|
||||
# the JSON data for message edit history,
|
||||
# so we'll always need to handle legacy data
|
||||
# unless we do a pretty tricky migration.
|
||||
LEGACY_PREV_TOPIC = "prev_subject"
|
||||
|
||||
# This constant is pretty closely coupled to the
|
||||
# database, but it's the JSON field.
|
||||
EXPORT_TOPIC_NAME = "subject"
|
||||
|
|
Loading…
Reference in New Issue