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:
Lauryn Menard 2022-03-03 17:21:05 +01:00 committed by Tim Abbott
parent e54dfda0b1
commit 58f21fc748
2 changed files with 1 additions and 10 deletions

View File

@ -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"],

View File

@ -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"