Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checks: Replace bare except (Flake8 E722) in po stats script (#4354)
This addresses the PEP8 style error of mentioning specific exceptions (Flake8 E722) by specifying the exception type in the except clause within the writejson function in grass_po_stats.py. Now, bare except is replaced by OSError to catch only OS-related exceptions because os.remove() can raise various OS-related exceptions such as FileNotFoundError or PermissionError. Additionally, it confirms that no other common Flake8 errors (E122, E128, E231, E401) are present in the file by removing the other ignores.
- Loading branch information