From 54731c1985646c7136639c0dfd759b2e4cfe1ef9 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Sun, 8 Dec 2024 17:51:10 -0500 Subject: [PATCH] raster: Fixed E402 by adding `noqa` exception (#4803) --- .flake8 | 1 - python/grass/pygrass/raster/__init__.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 2fa95e7ec67..36ab602783e 100644 --- a/.flake8 +++ b/.flake8 @@ -47,7 +47,6 @@ per-file-ignores = # C wrappers call libgis.G_gisinit before importing other modules. # TODO: Is this really needed? python/grass/pygrass/vector/__init__.py: E402 - python/grass/pygrass/raster/__init__.py: E402 python/grass/pygrass/vector/__init__.py: E402 python/grass/temporal/abstract_space_time_dataset.py: E722 python/grass/temporal/c_libraries_interface.py: E722 diff --git a/python/grass/pygrass/raster/__init__.py b/python/grass/pygrass/raster/__init__.py index 61ec85841cb..9967d62d98e 100644 --- a/python/grass/pygrass/raster/__init__.py +++ b/python/grass/pygrass/raster/__init__.py @@ -13,6 +13,7 @@ libgis.G_gisinit("") +# flake8: noqa: E402 # import pygrass modules from grass.pygrass.errors import must_be_open from grass.pygrass.gis.region import Region @@ -25,6 +26,8 @@ from grass.pygrass.raster.segment import Segment from grass.pygrass.raster.rowio import RowIO +# flake8: qa + WARN_OVERWRITE = "Raster map <{0}> already exists and will be overwritten" test_raster_name = "Raster_test_map"