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: Fix PEP8 E722 Error and Confirm No Other Common flake8 Errors in locale/ #4354

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

arohanajit
Copy link
Contributor

Description:

This PR addresses the PEP8 style error E722 by specifying the exception type in the except clause within the writejson function in grass_po_stats.py. Additionally, it confirms that no other common flake8 errors (E122, E128, E231, E401) are present in the codebase

Changes Made:

  • Specified Exception Type:
    • Changed the bare except: to except OSError: to catch only OS-related exceptions.

Rationale:

  • Exception Handling:
    • Specifying OSError in the except clause is appropriate because os.remove() can raise various OS-related exceptions such as FileNotFoundError or PermissionError. This avoids catching unintended exceptions and adheres to PEP8 guidelines.

@github-actions github-actions bot added Python Related code is in Python translation Message translation related labels Sep 21, 2024
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

Clear scope and straightforward explanation, thanks.

@wenzeslaus wenzeslaus self-assigned this Sep 23, 2024
@wenzeslaus wenzeslaus merged commit c32dd52 into OSGeo:main Sep 23, 2024
26 checks passed
@arohanajit arohanajit deleted the aajit-flake8-locale branch September 23, 2024 14:57
@neteler neteler added this to the 8.5.0 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Related code is in Python translation Message translation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants