diff --git a/QuickOSM/core/query_factory.py b/QuickOSM/core/query_factory.py index 60d1d3ec..f97fe279 100644 --- a/QuickOSM/core/query_factory.py +++ b/QuickOSM/core/query_factory.py @@ -160,7 +160,8 @@ def area(self) -> list: def _convert_to_multitypes(type_multi_request: str) -> List[MultiType]: """Converts a string of comma separated 'AND'/'OR's to a list of MultiType equivalents. - :param type_multi_request: A string of comma separated 'AND'/'OR's provided from input of processing algorithms + :param type_multi_request: A string of comma separated 'AND'/'OR's provided from input of processing + algorithms :type type_multi_request: str :return: list of MultiType @@ -177,7 +178,8 @@ def _convert_to_multitypes(type_multi_request: str) -> List[MultiType]: elif type_ == 'OR': types.append(MultiType.OR) else: - raise QueryFactoryException(tr('Only values "AND"/"OR" are allowed as logical operators.')) + raise QueryFactoryException( + tr('Only values "AND"/"OR" are allowed as logical operators.')) return types def _check_parameters(self) -> bool: @@ -245,7 +247,8 @@ def _check_parameters(self) -> bool: raise QueryFactoryException( tr('Too many logical operators were provided.') ) - elif len(self._type_multi_request) < len(self._key) - 1: + + if len(self._type_multi_request) < len(self._key) - 1: raise QueryFactoryException( tr('Not enough logical operators were provided.') ) diff --git a/QuickOSM/quick_osm_processing/build_input.py b/QuickOSM/quick_osm_processing/build_input.py index 2c572ab8..8bb9a014 100644 --- a/QuickOSM/quick_osm_processing/build_input.py +++ b/QuickOSM/quick_osm_processing/build_input.py @@ -15,7 +15,7 @@ ) from QuickOSM.core.utilities.tools import get_setting -from QuickOSM.definitions.osm import QueryType, MultiType +from QuickOSM.definitions.osm import QueryType from QuickOSM.definitions.overpass import OVERPASS_SERVERS from QuickOSM.qgis_plugin_tools.tools.i18n import tr @@ -184,10 +184,14 @@ def add_top_parameters(self): self.addParameter(param) param = QgsProcessingParameterString( - self.TYPE_MULTI_REQUEST, tr('Operator types to combine multiple keys and values with'), optional=True + self.TYPE_MULTI_REQUEST, + tr('Operator types to combine multiple keys and values with'), + optional=True ) + + # TODO: expand help string help_string = tr( - 'The logical operators used to combine keys and values, if there are multiple.' # TODO: expand help string + 'The logical operators used to combine keys and values, if there are multiple.' ) param.setHelp(help_string) self.addParameter(param)