mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-29 05:38:26 +00:00
Introduce support for MSC4429: Profile Updates for Legacy Sync (#19556)
Implements support for [MSC4429: Profile Updates for Legacy Sync](https://github.com/matrix-org/matrix-spec-proposals/pull/4429). Paired with https://github.com/matrix-org/complement/pull/849 and https://github.com/matrix-org/sytest/tree/anoa/msc4429 Tracking issue for removing unstable identifiers in Synapse: https://github.com/element-hq/synapse/issues/19891 Further improvements tracked in: https://github.com/element-hq/synapse/issues/19981 --------- Co-authored-by: Half-Shot <will@half-shot.uk> Co-authored-by: Jason Robinson <jasonr@element.io> Co-authored-by: Olivier 'reivilibre' <oliverw@element.io>
This commit is contained in:
co-authored by
Half-Shot
Jason Robinson
Olivier 'reivilibre'
parent
556154848c
commit
c5f02a9313
@@ -45,6 +45,7 @@ from mypy.types import (
|
||||
AnyType,
|
||||
CallableType,
|
||||
Instance,
|
||||
LiteralType,
|
||||
NoneType,
|
||||
Options,
|
||||
TupleType,
|
||||
@@ -813,6 +814,10 @@ def is_cacheable(
|
||||
if isinstance(rt, AnyType):
|
||||
return True, ("may be mutable" if verbose else None)
|
||||
|
||||
elif isinstance(rt, LiteralType):
|
||||
# Literal[True] etc
|
||||
return True, None
|
||||
|
||||
elif isinstance(rt, Instance):
|
||||
if (
|
||||
rt.type.fullname in IMMUTABLE_VALUE_TYPES
|
||||
|
||||
Reference in New Issue
Block a user