Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 13, 2024
1 parent 4ae83a6 commit 1b069c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions felt/core/fsl_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,9 +1187,8 @@ def gradient_fill_to_fsl(
"""
Converts a QGIS gradient fill symbol layer to FSL
"""
color = (layer.color() if layer.color().isValid() and
layer.color().alphaF() > 0 else
layer.color2())
color1_valid = layer.color().isValid() and layer.color().alphaF() > 0
color = layer.color() if color1_valid else layer.color2()
if not color.isValid() or color.alphaF() == 0:
return []

Expand Down
4 changes: 0 additions & 4 deletions felt/core/map_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ def run(self):

self.feedback = QgsFeedback()

upload_raster_as_styled = QgsSettings().value(
"felt/upload_raster_as_styled", True, bool, QgsSettings.Plugins
)

multi_step_feedback = MultiStepFeedback(
total_steps, self.feedback
)
Expand Down
13 changes: 9 additions & 4 deletions felt/test/test_layer_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def test_layer_style(self):
)
# should only be the layer's style, not the source information
self.assertNotIn('points.gpkg', style)

# pylint: enable=protected-access

def test_vector_conversion(self):
Expand Down Expand Up @@ -235,8 +236,10 @@ def test_raster_conversion_raw(self):
exporter = LayerExporter(
QgsCoordinateTransformContext()
)
result = exporter.export_layer_for_felt(layer,
force_upload_raster_as_styled=False)
result = exporter.export_layer_for_felt(
layer,
force_upload_raster_as_styled=False
)
self.assertEqual(result.result, LayerExportResult.Success)
self.assertTrue(result.filename)
self.assertEqual(result.filename[-4:], '.zip')
Expand Down Expand Up @@ -280,8 +283,10 @@ def test_raster_conversion_styled(self):
exporter = LayerExporter(
QgsCoordinateTransformContext()
)
result = exporter.export_layer_for_felt(layer,
force_upload_raster_as_styled=True)
result = exporter.export_layer_for_felt(
layer,
force_upload_raster_as_styled=True
)
self.assertEqual(result.result, LayerExportResult.Success)
self.assertTrue(result.filename)
self.assertEqual(result.filename[-4:], '.zip')
Expand Down

0 comments on commit 1b069c3

Please sign in to comment.