Add get_metadata() method and make query_metadata() raise KeyError consistently
Introduces a Pythonic get_metadata() method to BinaryView, Function, Project, TypeArchive, and TypeLibrary classes. This method behaves like dict.get(), returning a default value (None by default) when a key doesn't exist, instead of raising a KeyError. Additionally, updates query_metadata() in TypeArchive and TypeLibrary to raise KeyError when a key is not found, making them consistent with BinaryView, Function, and Project. Previously these two classes returned None on missing keys. This breaking change is documented in the method docstrings. This provides a more consistent and Pythonic API for querying metadata across all metadata-supporting classes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
P
Peter LaFosse committed
dd31558a0a1600342da23e2d0745be01ad19202b
Parent: f327d95