[GRASS-git] [OSGeo/grass] ca25eb: python: Use a context manager for opening files (S...
Edouard Choinière
noreply at github.com
Wed Jan 15 19:21:50 PST 2025
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: ca25eb3954115e9f57c99df05209770386b932dd
https://github.com/OSGeo/grass/commit/ca25eb3954115e9f57c99df05209770386b932dd
Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
Date: 2025-01-15 (Wed, 15 Jan 2025)
Changed paths:
M python/grass/temporal/aggregation.py
M temporal/t.rast.what/t.rast.what.py
M temporal/t.remove/t.remove.py
Log Message:
-----------
python: Use a context manager for opening files (SIM115) to solve some ResourceWarnings (#4224)
* grass.script.db: Close opened file in db_connection
* t.unregister: Use a context manager for opening files (SIM115)
* t.remove: Use a context manager for opening files (SIM115)
* t.rast.what: Use a context manager for opening files (SIM115)
* grass.temporal.aggregation: Use a context manager for opening files (SIM115)
* Apply suggestions from code review
* Move line out of context manager
* temporal: Use `contextlib.nullcontext` to not close sys.stdout in t.rast.what
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list