Use contextlib.suppress instead of except: pass by blablatdinov · Pull Request #113 · gitpython-developers/gitdb
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.