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

CI: Update .flake8 configuration and fix flake8 errors in lib/init/grass.py #4289

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

arohanajit
Copy link
Contributor

Description

This pull request addresses several Flake8 warnings and improves exception handling in the GRASS GIS initialization script. The changes focus on removing unused variables and replacing bare except clauses with more specific exception handling.

Changes

  1. Removed unused 'e' variables in exception handling for locale errors.
  2. Improved exception handling when reading the VERSIONNUMBER file.

Specific Changes

1. Removed unused 'e' variables:

In the locale setting section, removed as e from two except locale.Error clauses where the error variable was not being used.

# Before
except locale.Error as e:
    # code not using 'e'

# After
except locale.Error:
    # code remains the same

@github-actions github-actions bot added Python Related code is in Python libraries labels Sep 8, 2024
@echoix
Copy link
Member

echoix commented Sep 10, 2024

Just fine tune the title and it looks fine enough to merge!

The changes are quite simple and limited in scope.

@arohanajit arohanajit changed the title Update .flake8 configuration - fixed flake8 errors in lib/init/grass.py CI: Update .flake8 configuration and fix flake8 errors in lib/init/grass.py Sep 11, 2024
@echoix
Copy link
Member

echoix commented Sep 11, 2024

@arohanajit Would you fix the conflicts so it can be finished ? (A merged PR from this morning removed an exclusion line just besides the one that this PR removes, so it ends up conflicting)

@echoix echoix enabled auto-merge (squash) September 11, 2024 23:34
@echoix echoix merged commit 5719ba6 into OSGeo:main Sep 12, 2024
26 checks passed
@arohanajit arohanajit deleted the arohanajit-flake8 branch September 12, 2024 01:14
@neteler neteler added this to the 8.5.0 milestone Sep 12, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libraries Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants