gitpython-developers / gitdb

IO of git-style object databases
http://gitdb.readthedocs.org
Other
212 stars 65 forks source link

Use contextlib.suppress instead of except: pass #113

Closed blablatdinov closed 1 month ago

blablatdinov commented 1 month ago

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.

blablatdinov commented 1 month ago

@Byron Take a look please