-
-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: Use a context manager for opening files (SIM115) to solve som…
…e 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
- Loading branch information
Showing
3 changed files
with
148 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.