chore: Update pylint to 2.17.4 (#24700)

Co-authored-by: John Bodley <john.bodley@gmail.com>
This commit is contained in:
EugeneTorap
2023-07-25 03:13:49 +03:00
committed by GitHub
parent c17accc0b4
commit fc89718d48
99 changed files with 297 additions and 336 deletions

View File

@@ -474,8 +474,8 @@ class DatasetRestApi(BaseSupersetModelRestApi):
@event_logger.log_this_with_context(
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.export",
log_to_statsd=False,
) # pylint: disable=too-many-locals
def export(self, **kwargs: Any) -> Response:
)
def export(self, **kwargs: Any) -> Response: # pylint: disable=too-many-locals
"""Export datasets
---
get:

View File

@@ -106,7 +106,9 @@ def import_metric(session: Session, metric: BaseMetric) -> BaseMetric:
if isinstance(metric, SqlMetric):
lookup_metric = lookup_sqla_metric
else:
raise Exception(f"Invalid metric type: {metric}")
raise Exception( # pylint: disable=broad-exception-raised
f"Invalid metric type: {metric}"
)
return import_simple_obj(session, metric, lookup_metric)
@@ -125,7 +127,9 @@ def import_column(session: Session, column: BaseColumn) -> BaseColumn:
if isinstance(column, TableColumn):
lookup_column = lookup_sqla_column
else:
raise Exception(f"Invalid column type: {column}")
raise Exception( # pylint: disable=broad-exception-raised
f"Invalid column type: {column}"
)
return import_simple_obj(session, column, lookup_column)

View File

@@ -66,7 +66,9 @@ def get_sqla_type(native_type: str) -> VisitableType:
size = int(match.group(1))
return String(size)
raise Exception(f"Unknown type: {native_type}")
raise Exception( # pylint: disable=broad-exception-raised
f"Unknown type: {native_type}"
)
def get_dtype(df: pd.DataFrame, dataset: SqlaTable) -> dict[str, VisitableType]:

View File

@@ -149,7 +149,7 @@ class DatasetRelatedObjectsResponse(Schema):
class ImportV1ColumnSchema(Schema):
# pylint: disable=no-self-use, unused-argument
# pylint: disable=unused-argument
@pre_load
def fix_extra(self, data: dict[str, Any], **kwargs: Any) -> dict[str, Any]:
"""
@@ -175,7 +175,7 @@ class ImportV1ColumnSchema(Schema):
class ImportV1MetricSchema(Schema):
# pylint: disable=no-self-use, unused-argument
# pylint: disable=unused-argument
@pre_load
def fix_extra(self, data: dict[str, Any], **kwargs: Any) -> dict[str, Any]:
"""
@@ -198,7 +198,7 @@ class ImportV1MetricSchema(Schema):
class ImportV1DatasetSchema(Schema):
# pylint: disable=no-self-use, unused-argument
# pylint: disable=unused-argument
@pre_load
def fix_extra(self, data: dict[str, Any], **kwargs: Any) -> dict[str, Any]:
"""