Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Fix readlines-in-for (FURB129) #4034

Merged
merged 1 commit into from
Jul 13, 2024
Merged

Conversation

echoix
Copy link
Member

@echoix echoix commented Jul 11, 2024

Ruff rule: https://docs.astral.sh/ruff/rules/readlines-in-for/
"It is more convenient and performant to iterate over the file object directly"

In python docs for io.IOBase.readlines
"Note that it’s already possible to iterate on file objects using for line in file: ... without calling file.readlines()."

@echoix echoix added this to the 8.5.0 milestone Jul 11, 2024
@echoix echoix requested a review from ninsbl July 11, 2024 16:15
@github-actions github-actions bot added GUI wxGUI related raster Related to raster data processing Python Related code is in Python libraries module general display imagery labels Jul 11, 2024
@echoix echoix enabled auto-merge (squash) July 11, 2024 20:59
@echoix echoix merged commit a751f93 into OSGeo:main Jul 13, 2024
26 checks passed
@echoix echoix deleted the fix-readlines-in-for branch July 13, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display general GUI wxGUI related imagery libraries 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