mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: upgrade black (#19410)
This commit is contained in:
@@ -162,7 +162,10 @@ class ExplorePermalinkRestApi(BaseApi):
|
||||
return self.response(200, **value)
|
||||
except ExplorePermalinkInvalidStateError as ex:
|
||||
return self.response(400, message=str(ex))
|
||||
except (ChartAccessDeniedError, DatasetAccessDeniedError,) as ex:
|
||||
except (
|
||||
ChartAccessDeniedError,
|
||||
DatasetAccessDeniedError,
|
||||
) as ex:
|
||||
return self.response(403, message=str(ex))
|
||||
except (ChartNotFoundError, DatasetNotFoundError) as ex:
|
||||
return self.response(404, message=str(ex))
|
||||
|
||||
@@ -48,7 +48,9 @@ class CreateExplorePermalinkCommand(BaseExplorePermalinkCommand):
|
||||
"state": self.state,
|
||||
}
|
||||
command = CreateKeyValueCommand(
|
||||
actor=self.actor, resource=self.resource, value=value,
|
||||
actor=self.actor,
|
||||
resource=self.resource,
|
||||
value=value,
|
||||
)
|
||||
key = command.run()
|
||||
return encode_permalink_key(key=key.id, salt=self.salt)
|
||||
|
||||
@@ -42,7 +42,8 @@ class GetExplorePermalinkCommand(BaseExplorePermalinkCommand):
|
||||
try:
|
||||
key = decode_permalink_id(self.key, salt=self.salt)
|
||||
value: Optional[ExplorePermalinkValue] = GetKeyValueCommand(
|
||||
resource=self.resource, key=key,
|
||||
resource=self.resource,
|
||||
key=key,
|
||||
).run()
|
||||
if value:
|
||||
chart_id: Optional[int] = value.get("chartId")
|
||||
|
||||
@@ -19,7 +19,9 @@ from marshmallow import fields, Schema
|
||||
|
||||
class ExplorePermalinkPostSchema(Schema):
|
||||
formData = fields.Dict(
|
||||
required=True, allow_none=False, description="Chart form data",
|
||||
required=True,
|
||||
allow_none=False,
|
||||
description="Chart form data",
|
||||
)
|
||||
urlParams = fields.List(
|
||||
fields.Tuple(
|
||||
|
||||
Reference in New Issue
Block a user