mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: Embrace the walrus operator (#24127)
This commit is contained in:
@@ -40,8 +40,7 @@ class MigrateAreaChart(MigrateViz):
|
||||
if self.data.get("contribution"):
|
||||
self.data["contributionMode"] = "row"
|
||||
|
||||
stacked = self.data.get("stacked_style")
|
||||
if stacked:
|
||||
if stacked := self.data.get("stacked_style"):
|
||||
stacked_map = {
|
||||
"expand": "Expand",
|
||||
"stack": "Stack",
|
||||
@@ -49,7 +48,6 @@ class MigrateAreaChart(MigrateViz):
|
||||
self.data["show_extra_controls"] = True
|
||||
self.data["stack"] = stacked_map.get(stacked)
|
||||
|
||||
x_axis_label = self.data.get("x_axis_label")
|
||||
if x_axis_label:
|
||||
if x_axis_label := self.data.get("x_axis_label"):
|
||||
self.data["x_axis_title"] = x_axis_label
|
||||
self.data["x_axis_title_margin"] = 30
|
||||
|
||||
Reference in New Issue
Block a user