This PR refactors the LooseObjectDB class in gitdb/db/loose.py to utilize contextlib.suppress for handling KeyError exceptions, replacing the previous try-except block.
This change improves code readability and aligns with best practices for exception handling in Python.
This PR refactors the
LooseObjectDB
class in gitdb/db/loose.py to utilizecontextlib.suppress
for handlingKeyError
exceptions, replacing the previous try-except block.This change improves code readability and aligns with best practices for exception handling in Python.