From 358efc728f72d33f75d56a62e42067f433200aae Mon Sep 17 00:00:00 2001 From: John Bodley <4567245+john-bodley@users.noreply.github.com> Date: Mon, 16 Aug 2021 09:00:24 -0700 Subject: [PATCH] chore(pylint): Re-enable super-with-arguments check (#16138) Co-authored-by: John Bodley --- .pylintrc | 1 - superset/tasks/cache.py | 4 ++-- superset/utils/url_map_converters.py | 2 +- superset/views/schedules.py | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.pylintrc b/.pylintrc index c075529867576..f7ef308c81e55 100644 --- a/.pylintrc +++ b/.pylintrc @@ -87,7 +87,6 @@ disable= ungrouped-imports, import-outside-toplevel, raise-missing-from, - super-with-arguments, too-few-public-methods, too-many-locals, duplicate-code, diff --git a/superset/tasks/cache.py b/superset/tasks/cache.py index b93e6a633cadf..32b421a47055a 100644 --- a/superset/tasks/cache.py +++ b/superset/tasks/cache.py @@ -161,7 +161,7 @@ class TopNDashboardsStrategy(Strategy): name = "top_n_dashboards" def __init__(self, top_n: int = 5, since: str = "7 days ago") -> None: - super(TopNDashboardsStrategy, self).__init__() + super().__init__() self.top_n = top_n self.since = parse_human_datetime(since) if since else None @@ -206,7 +206,7 @@ class DashboardTagsStrategy(Strategy): name = "dashboard_tags" def __init__(self, tags: Optional[List[str]] = None) -> None: - super(DashboardTagsStrategy, self).__init__() + super().__init__() self.tags = tags or [] def get_urls(self) -> List[str]: diff --git a/superset/utils/url_map_converters.py b/superset/utils/url_map_converters.py index 463dfcdc9af8a..c6a14f3fd8048 100644 --- a/superset/utils/url_map_converters.py +++ b/superset/utils/url_map_converters.py @@ -23,7 +23,7 @@ class RegexConverter(BaseConverter): def __init__(self, url_map: Map, *items: List[str]) -> None: - super(RegexConverter, self).__init__(url_map) # type: ignore + super().__init__(url_map) # type: ignore self.regex = items[0] diff --git a/superset/views/schedules.py b/superset/views/schedules.py index 93a3568c390e1..7924143955e7b 100644 --- a/superset/views/schedules.py +++ b/superset/views/schedules.py @@ -267,7 +267,7 @@ def list(self) -> FlaskResponse: def pre_add(self, item: "DashboardEmailScheduleView") -> None: if item.dashboard is None: raise SupersetException("Dashboard is mandatory") - super(DashboardEmailScheduleView, self).pre_add(item) + super().pre_add(item) class SliceEmailScheduleView(EmailScheduleView): # pylint: disable=too-many-ancestors @@ -348,4 +348,4 @@ def list(self) -> FlaskResponse: def pre_add(self, item: "SliceEmailScheduleView") -> None: if item.slice is None: raise SupersetException("Slice is mandatory") - super(SliceEmailScheduleView, self).pre_add(item) + super().pre_add(item)