summary refs log tree commit diff
path: root/.codecov.yml
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-09-22 12:30:59 +0100
committerGitHub <noreply@github.com>2021-09-22 12:30:59 +0100
commit4ecf51812ebf4cbacd3c6042aa29cb37b7855da3 (patch)
tree5bd46a2ccc2c2090e6d996d385abafffb204f116 /.codecov.yml
parentTrack why we're evicting from caches (#10829) (diff)
downloadsynapse-4ecf51812ebf4cbacd3c6042aa29cb37b7855da3.tar.xz
Include outlier status in `str(event)` for V2/V3 events (#10879)
I meant to do this before, in #10591, but because I'm stupid I forgot to do it
for V2 and V3 events.

I've factored the common code out to `EventBase` to save us having two copies
of it.

This means that for `FrozenEvent` we replace `self.get("event_id", None)` with
`self.event_id`, which I think is safe. `get()` is an alias for
`self._dict.get()`, whereas `event_id()` is an `@property` method which looks
up `self._event_id`, which is populated during construction from the same
dict. We don't seem to rely on the fallback, because if the `event_id` key is
absent from the dict then construction of the `EventBase` object will
fail.

Long story short, the only way this could change behaviour is if
`event_dict["event_id"]` is changed *after* the `EventBase` object is
constructed without updating the `_event_id` field, or vice versa - either of
which would be very problematic anyway and the behavior of `str(event)` is the
least of our worries.
Diffstat (limited to '.codecov.yml')
0 files changed, 0 insertions, 0 deletions