From fce29cac995f165f9e80801f338e5321c857815b Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 19 Dec 2024 17:16:12 -0500 Subject: [PATCH] grass.pygrass: Fixed E402 in vector/ (#4715) --- .flake8 | 1 - python/grass/pygrass/vector/__init__.py | 18 +++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.flake8 b/.flake8 index fa12f18c318..e650938d299 100644 --- a/.flake8 +++ b/.flake8 @@ -46,7 +46,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/vector/__init__.py: E402 python/grass/temporal/datetime_math.py: E722 python/grass/temporal/spatial_topology_dataset_connector.py: E722 python/grass/temporal/temporal_algebra.py: E722 diff --git a/python/grass/pygrass/vector/__init__.py b/python/grass/pygrass/vector/__init__.py index 6723b2e44b3..7313af1fd34 100644 --- a/python/grass/pygrass/vector/__init__.py +++ b/python/grass/pygrass/vector/__init__.py @@ -1,22 +1,26 @@ from os.path import join, exists import grass.lib.gis as libgis +import ctypes + +# flake8: noqa: E402 libgis.G_gisinit("") import grass.lib.vector as libvect -import ctypes - -# import pygrass modules from grass.pygrass.vector.vector_type import VTYPE from grass.pygrass.errors import GrassError, must_be_open from grass.pygrass.gis import Location - -from grass.pygrass.vector.geometry import GEOOBJ as _GEOOBJ -from grass.pygrass.vector.geometry import read_line, read_next_line -from grass.pygrass.vector.geometry import Area as _Area +from grass.pygrass.vector.geometry import ( + GEOOBJ as _GEOOBJ, + read_line, + read_next_line, + Area as _Area, +) from grass.pygrass.vector.abstract import Info from grass.pygrass.vector.basic import Bbox, Cats, Ilist +# flake8: qa + _NUMOF = { "areas": libvect.Vect_get_num_areas,