mirror of
https://github.com/apache/superset.git
synced 2026-04-28 04:25:07 +00:00
feat(api): bump marshmallow and FAB to version 3 (#9964)
* feat(api): bump marshmallow and FAB to version 3 * revert query context tests changes * obey mypy * fix tests * ignore types that collide with marshmallow * preparing for RC2 * fix tests for marshmallow 3 * typing fixes for marshmallow * fix tests and black * fix tests * bump to RC3 and lint * Test RC4 * Final 3.0.0 * Address comments, fix tests, better naming, docs * fix test * couple of fixes, addressing comments * bumping marshmallow
This commit is contained in:
committed by
GitHub
parent
bacf567656
commit
878dbcda3f
@@ -34,7 +34,7 @@ class DatabaseNotFoundValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(_("Database does not exist"), field_names=["database"])
|
||||
super().__init__([_("Database does not exist")], field_name="database")
|
||||
|
||||
|
||||
class DatabaseChangeValidationError(ValidationError):
|
||||
@@ -43,7 +43,7 @@ class DatabaseChangeValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(_("Database not allowed to change"), field_names=["database"])
|
||||
super().__init__([_("Database not allowed to change")], field_name="database")
|
||||
|
||||
|
||||
class DatasetExistsValidationError(ValidationError):
|
||||
@@ -53,7 +53,7 @@ class DatasetExistsValidationError(ValidationError):
|
||||
|
||||
def __init__(self, table_name: str) -> None:
|
||||
super().__init__(
|
||||
get_datasource_exist_error_msg(table_name), field_names=["table_name"]
|
||||
get_datasource_exist_error_msg(table_name), field_name="table_name"
|
||||
)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class DatasetColumnNotFoundValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(_("One or more columns do not exist"), field_names=["columns"])
|
||||
super().__init__([_("One or more columns do not exist")], field_name="columns")
|
||||
|
||||
|
||||
class DatasetColumnsDuplicateValidationError(ValidationError):
|
||||
@@ -73,7 +73,7 @@ class DatasetColumnsDuplicateValidationError(ValidationError):
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
_("One or more columns are duplicated"), field_names=["columns"]
|
||||
[_("One or more columns are duplicated")], field_name="columns"
|
||||
)
|
||||
|
||||
|
||||
@@ -83,9 +83,7 @@ class DatasetColumnsExistsValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
_("One or more columns already exist"), field_names=["columns"]
|
||||
)
|
||||
super().__init__([_("One or more columns already exist")], field_name="columns")
|
||||
|
||||
|
||||
class DatasetMetricsNotFoundValidationError(ValidationError):
|
||||
@@ -94,7 +92,7 @@ class DatasetMetricsNotFoundValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(_("One or more metrics do not exist"), field_names=["metrics"])
|
||||
super().__init__([_("One or more metrics do not exist")], field_name="metrics")
|
||||
|
||||
|
||||
class DatasetMetricsDuplicateValidationError(ValidationError):
|
||||
@@ -104,7 +102,7 @@ class DatasetMetricsDuplicateValidationError(ValidationError):
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
_("One or more metrics are duplicated"), field_names=["metrics"]
|
||||
[_("One or more metrics are duplicated")], field_name="metrics"
|
||||
)
|
||||
|
||||
|
||||
@@ -114,9 +112,7 @@ class DatasetMetricsExistsValidationError(ValidationError):
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
_("One or more metrics already exist"), field_names=["metrics"]
|
||||
)
|
||||
super().__init__([_("One or more metrics already exist")], field_name="metrics")
|
||||
|
||||
|
||||
class TableNotFoundValidationError(ValidationError):
|
||||
@@ -126,20 +122,22 @@ class TableNotFoundValidationError(ValidationError):
|
||||
|
||||
def __init__(self, table_name: str) -> None:
|
||||
super().__init__(
|
||||
_(
|
||||
"Table [%(table_name)s] could not be found, "
|
||||
"please double check your "
|
||||
"database connection, schema, and "
|
||||
"table name",
|
||||
table_name=table_name,
|
||||
),
|
||||
field_names=["table_name"],
|
||||
[
|
||||
_(
|
||||
"Table [%(table_name)s] could not be found, "
|
||||
"please double check your "
|
||||
"database connection, schema, and "
|
||||
"table name",
|
||||
table_name=table_name,
|
||||
)
|
||||
],
|
||||
field_name="table_name",
|
||||
)
|
||||
|
||||
|
||||
class OwnersNotFoundValidationError(ValidationError):
|
||||
def __init__(self) -> None:
|
||||
super().__init__(_("Owners are invalid"), field_names=["owners"])
|
||||
super().__init__([_("Owners are invalid")], field_name="owners")
|
||||
|
||||
|
||||
class DatasetNotFoundError(CommandException):
|
||||
|
||||
Reference in New Issue
Block a user