From e2021d0f86abff8982384f363f676a5a34ebc5d8 Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Sun, 23 Jul 2023 13:00:49 +0200 Subject: [PATCH] fix black and ruff --- atproto/xrpc_client/models/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atproto/xrpc_client/models/base.py b/atproto/xrpc_client/models/base.py index f05ce126..9444cca5 100644 --- a/atproto/xrpc_client/models/base.py +++ b/atproto/xrpc_client/models/base.py @@ -8,6 +8,7 @@ class ModelBase: Provides square brackets [] notation to get attributes like in a dictionary. """ + def __getitem__(self, item: str): if hasattr(self, item): return getattr(self, item) @@ -35,7 +36,7 @@ class DotDict(UnknownDict): """Dot notation for dictionaries. Note: - If the record is out of the official lexicon, it’s impossible to deserialize it to a proper data model. + If the record is out of the official lexicon, it`s impossible to deserialize it to a proper data model. Such models will fall back to dictionaries. All unknown "Union" types will also be caught as dicts. This class exists to provide an ability to use such fallbacks as “real” data models.