mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
[processing] encoding and indentation fixes
This commit is contained in:
parent
8bbd55943a
commit
2895493cce
@ -315,10 +315,10 @@ class SagaAlgorithm(SagaAlgorithmBase):
|
||||
try:
|
||||
filePath.encode('ascii')
|
||||
except UnicodeEncodeError:
|
||||
nonAsciiFilePath = filePath
|
||||
nonAsciiFilePath = filePath
|
||||
filePath = QgsProcessingUtils.generateTempFilename(out.name() + os.path.splitext(filePath)[1])
|
||||
output_files_nonascii[filePath] = nonAsciiFilePath
|
||||
|
||||
|
||||
output_files[out.name()] = filePath
|
||||
command += ' -{} "{}"'.format(out.name(), filePath)
|
||||
|
||||
@ -442,8 +442,8 @@ class SagaAlgorithm(SagaAlgorithmBase):
|
||||
|
||||
if isinstance(param, QgsProcessingParameterRasterLayer):
|
||||
raster_layer_params.append(param.name())
|
||||
elif (isinstance(param, QgsProcessingParameterMultipleLayers) and
|
||||
param.layerType() == QgsProcessing.TypeRaster):
|
||||
elif (isinstance(param, QgsProcessingParameterMultipleLayers)
|
||||
and param.layerType() == QgsProcessing.TypeRaster):
|
||||
raster_layer_params.extend(param.name())
|
||||
|
||||
for layer_param in raster_layer_params:
|
||||
|
||||
@ -115,7 +115,7 @@ class TestSagaAlgorithms(unittest.TestCase, AlgorithmsTestBase.AlgorithmsTest):
|
||||
alg = QgsApplication.processingRegistry().createAlgorithmById('saga:fixeddistancebuffer')
|
||||
self.assertIsNotNone(alg)
|
||||
|
||||
temp_file = os.path.join(self.temp_dir, 'non_ascii_ñññ.gpkg')
|
||||
temp_file = os.path.join(self.temp_dir, 'non_ascii_ñññ.gpkg')
|
||||
parameters = {'SHAPES':'testmem',
|
||||
'DIST_FIELD_DEFAULT':5,
|
||||
'NZONES':1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user