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 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) 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