Skip to content

style: Fix SIM115 linting errors using context managers for file operations adding context managers in scripts/ - #5329

Merged
echoix merged 3 commits into
OSGeo:mainfrom
arohanajit:ruff-scripts1
Mar 8, 2025
Merged

style: Fix SIM115 linting errors using context managers for file operations adding context managers in scripts/#5329
echoix merged 3 commits into
OSGeo:mainfrom
arohanajit:ruff-scripts1

Conversation

@arohanajit

Copy link
Copy Markdown
Contributor

This PR fixes SIM115 linting errors across several modules by replacing direct file operations with proper context managers (with statements)

@github-actions github-actions Bot added raster Related to raster data processing Python Related code is in Python module imagery labels Mar 7, 2025
Comment thread scripts/i.spectral/i.spectral.py Outdated
Comment thread scripts/i.spectral/i.spectral.py Outdated
Comment thread scripts/wxpyimgview/wxpyimgview_gui.py Outdated

@echoix echoix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@echoix
echoix merged commit b94776a into OSGeo:main Mar 8, 2025
@github-actions github-actions Bot added this to the 8.5.0 milestone Mar 8, 2025
@echoix echoix changed the title style: Fix SIM115 linting errors using context managers for file operationsadding context managers in scripts/ style: Fix SIM115 linting errors using context managers for file operations adding context managers in scripts/ Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

imagery module Python Related code is in Python raster Related to raster data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants