From 7c46658b3ad92d12ff1f65e33fdd47f6e20ed997 Mon Sep 17 00:00:00 2001 From: Wolfgang Kaltz Date: Wed, 18 Oct 2023 10:36:29 +0200 Subject: [PATCH 1/3] Update of the code style libraries --- dev-requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 4ffce3021d..983fb72bda 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -flake8==6.0.0 -pyflakes==3.0.1 -pycodestyle==2.10.0 +flake8==6.1.0 +pyflakes==3.1.0 +pycodestyle==2.11.1 Sphinx==7.1.2 sphinx_rtd_theme==1.3.0 psycopg2==2.9.9 From 62a7f646cce968a90447bf06e14e172ce29bd462 Mon Sep 17 00:00:00 2001 From: Wolfgang Kaltz Date: Wed, 18 Oct 2023 10:44:23 +0200 Subject: [PATCH 2/3] Fix lint errors --- tests/contrib.data_sources.standard/test_init.py | 2 +- tests/core/test_hook_methods.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/contrib.data_sources.standard/test_init.py b/tests/contrib.data_sources.standard/test_init.py index 5e0e6be6c3..66b076aac9 100644 --- a/tests/contrib.data_sources.standard/test_init.py +++ b/tests/contrib.data_sources.standard/test_init.py @@ -1,7 +1,7 @@ import pytest from sqlalchemy.orm import declarative_base from sqlalchemy import String, DateTime, Column -from pyramid_oereb.contrib.data_sources.standard import create_schema_sql, tables, create_tables_sql,\ +from pyramid_oereb.contrib.data_sources.standard import create_schema_sql, tables, create_tables_sql, \ create_sql diff --git a/tests/core/test_hook_methods.py b/tests/core/test_hook_methods.py index 5dc317c733..0a88ae5f9f 100644 --- a/tests/core/test_hook_methods.py +++ b/tests/core/test_hook_methods.py @@ -17,7 +17,7 @@ from pyramid_oereb.core.records.view_service import LegendEntryRecord from pyramid_oereb.core.records.real_estate import RealEstateRecord from pyramid_oereb.core.hook_methods import compare, get_symbol, get_symbol_ref, \ - get_logo_ref, get_qr_code_ref, get_surveying_data_update_date,\ + get_logo_ref, get_qr_code_ref, get_surveying_data_update_date, \ plr_sort_within_themes from pyramid_oereb.contrib.data_sources.standard.sources.plr import StandardThemeConfigParser import pyramid_oereb.contrib.data_sources.standard.hook_methods From d0d56b6639507931f6239180c8b298e1adc2a5e5 Mon Sep 17 00:00:00 2001 From: Wolfgang Kaltz Date: Wed, 18 Oct 2023 10:54:23 +0200 Subject: [PATCH 3/3] Adapt code to new coding style requirement --- pyramid_oereb/core/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid_oereb/core/config.py b/pyramid_oereb/core/config.py index e564e1ffed..11f3d70c87 100644 --- a/pyramid_oereb/core/config.py +++ b/pyramid_oereb/core/config.py @@ -1577,8 +1577,8 @@ def _get_object_path(current_path, current_object, path, default, required): current_path.append(k) - if type(current_object[k]) != dict: - raise ConfigurationError('The configuration {} is not an object.'.format( + if not isinstance(current_object[k], dict): + raise ConfigurationError('The configuration {} is not a dictionary.'.format( '.'.join(current_path))) return Config._get_object_path(current_path, current_object[k], path[1:], default, required)