From 785d47490c6581fd5ed763c57e4f52071db6b441 Mon Sep 17 00:00:00 2001 From: Guido Riembauer Date: Wed, 6 Sep 2023 11:35:13 +0200 Subject: [PATCH 1/3] linting --- .github/workflows/linting.yml | 2 +- src/grass_gis_helpers/location.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 39eb1ac..9aac4ab 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,6 +1,6 @@ name: Python Flake8, black and pylint code quality check -on: [push] +on: [push,pull_request] jobs: lint: diff --git a/src/grass_gis_helpers/location.py b/src/grass_gis_helpers/location.py index 5506a2c..7021201 100644 --- a/src/grass_gis_helpers/location.py +++ b/src/grass_gis_helpers/location.py @@ -30,6 +30,6 @@ def get_location_size(): grass.message( _( ("\nDisk usage of GRASS GIS database:\n", - f"{cmd.communicate()[0].decode('utf-8').rstrip()}\n"), + f"{cmd.communicate()[0].decode('utf-8').rstrip()}\n"), ) ) From b6bc2542ac4e46fc8dfdec558fc931227dbedfa1 Mon Sep 17 00:00:00 2001 From: Guido Riembauer Date: Wed, 6 Sep 2023 11:37:41 +0200 Subject: [PATCH 2/3] fix linting --- src/grass_gis_helpers/cleanup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/grass_gis_helpers/cleanup.py b/src/grass_gis_helpers/cleanup.py index d62998a..fcc047c 100644 --- a/src/grass_gis_helpers/cleanup.py +++ b/src/grass_gis_helpers/cleanup.py @@ -20,9 +20,8 @@ import shutil import gc -from .location import get_location_size - import grass.script as grass +from .location import get_location_size def general_cleanup( From 31e6101734bd67813cfd52285d3d8bff70b553d9 Mon Sep 17 00:00:00 2001 From: Guido Riembauer Date: Wed, 6 Sep 2023 11:39:29 +0200 Subject: [PATCH 3/3] apply black --- src/grass_gis_helpers/location.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/grass_gis_helpers/location.py b/src/grass_gis_helpers/location.py index 7021201..ff9f08c 100644 --- a/src/grass_gis_helpers/location.py +++ b/src/grass_gis_helpers/location.py @@ -29,7 +29,9 @@ def get_location_size(): ) grass.message( _( - ("\nDisk usage of GRASS GIS database:\n", - f"{cmd.communicate()[0].decode('utf-8').rstrip()}\n"), + ( + "\nDisk usage of GRASS GIS database:\n", + f"{cmd.communicate()[0].decode('utf-8').rstrip()}\n", + ), ) )