diff options
author | Jonathan Corbet <corbet@lwn.net> | 2025-07-02 13:55:56 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2025-07-15 13:43:30 -0600 |
commit | bd5628bf60abd6f283d1fd8bdcff45c272971c6b (patch) | |
tree | a31bac3ffbab5869b30cb6aa36ea54e3a64c814c /scripts/lib/kdoc/kdoc_item.py | |
parent | 08b8dc43d18d5d0c4791cc630d5cddf98eaa51ea (diff) |
docs: kdoc: directly access the always-there KdocItem fields
They are part of the interface, so use them directly. This allows the
removal of the transitional __dict__ hack in KdocItem.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_item.py')
-rw-r--r-- | scripts/lib/kdoc/kdoc_item.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/lib/kdoc/kdoc_item.py b/scripts/lib/kdoc/kdoc_item.py index ccabb448b5d4d..b3b225764550d 100644 --- a/scripts/lib/kdoc/kdoc_item.py +++ b/scripts/lib/kdoc/kdoc_item.py @@ -23,10 +23,7 @@ class KdocItem: self.other_stuff = other_stuff def get(self, key, default = None): - ret = self.other_stuff.get(key, default) - if ret == default: - return self.__dict__.get(key, default) - return ret + return self.other_stuff.get(key, default) def __getitem__(self, key): return self.get(key) |