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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
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.

1 participant