-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add type hints to schema deltas #15497
Changes from 11 commits
689db6a
8894bef
3e29d56
33fb232
556855c
9c6e91e
85e4bb3
91f74c2
7978dc9
e76a736
fbacc65
e8bc91a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve type hints. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve type hints. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of the way mypy assigns python files to modules (it essentially searches the directory tree until it finds a This was the only conflict; I played with some of the options for changing this behavior (namespace packages, etc.) but it seemed easiest to just rename the single offender. This is from a really really old schema so I think renaming it won't break anything, but I'm not 100% confident on that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only breakage I can see: someone who is still on schema 31 might end up trying to apply the renamed migration after it was already run, if they upgraded directly to a Synapse version with this change. This looks to be around 7 years old now. I think we should be blasé about breaking setups which are that old and suffer from known security problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is safe to remove, because we do a hasattr check:
synapse/synapse/storage/prepare_database.py
Line 510 in 9bb2eac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have called that out, sorry. 👍