[GRASS-git] [OSGeo/grass] c32dd5: checks: Replace bare except (Flake8 E722) in po st...

Arohan Ajit noreply at github.com
Mon Sep 23 06:41:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: c32dd525746f0674617cb5595d93b9e3cb6d7677
      https://github.com/OSGeo/grass/commit/c32dd525746f0674617cb5595d93b9e3cb6d7677
  Author: Arohan Ajit <arohanajit232 at gmail.com>
  Date:   2024-09-23 (Mon, 23 Sep 2024)

  Changed paths:
    M .flake8
    M locale/grass_po_stats.py

  Log Message:
  -----------
  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.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list