diff --git a/.pylintrc b/.pylintrc index bf97ed2c4e..e921ee5ac8 100644 --- a/.pylintrc +++ b/.pylintrc @@ -85,7 +85,6 @@ disable= missing-docstring, too-many-lines, raise-missing-from, - too-few-public-methods, duplicate-code, [REPORTS] diff --git a/superset/commands/base.py b/superset/commands/base.py index 2db12bb6d2..2592a03fa7 100644 --- a/superset/commands/base.py +++ b/superset/commands/base.py @@ -43,7 +43,7 @@ class BaseCommand(ABC): """ -class CreateMixin: +class CreateMixin: # pylint: disable=too-few-public-methods @staticmethod def populate_owners( user: User, owner_ids: Optional[List[int]] = None @@ -61,7 +61,7 @@ class CreateMixin: return populate_owners(user, owner_ids, default_to_user=True) -class UpdateMixin: +class UpdateMixin: # pylint: disable=too-few-public-methods @staticmethod def populate_owners( user: User, owner_ids: Optional[List[int]] = None diff --git a/superset/databases/schemas.py b/superset/databases/schemas.py index 303d74057e..b0dfc2f9aa 100644 --- a/superset/databases/schemas.py +++ b/superset/databases/schemas.py @@ -214,7 +214,7 @@ def extra_validator(value: str) -> str: return value -class DatabaseParametersSchemaMixin: +class DatabaseParametersSchemaMixin: # pylint: disable=too-few-public-methods """ Allow SQLAlchemy URI to be passed as separate parameters. diff --git a/superset/extensions.py b/superset/extensions.py index 619de6a234..dafb4551ae 100644 --- a/superset/extensions.py +++ b/superset/extensions.py @@ -98,7 +98,7 @@ class UIManifestProcessor: return self.manifest.get(bundle, {}).get(asset_type, []) -class ProfilingExtension: +class ProfilingExtension: # pylint: disable=too-few-public-methods def __init__(self, interval: float = 1e-4) -> None: self.interval = interval diff --git a/superset/utils/encrypt.py b/superset/utils/encrypt.py index 10bc97d80f..240ca5aa8b 100644 --- a/superset/utils/encrypt.py +++ b/superset/utils/encrypt.py @@ -22,7 +22,7 @@ from sqlalchemy import TypeDecorator from sqlalchemy_utils import EncryptedType -class AbstractEncryptedFieldAdapter(ABC): +class AbstractEncryptedFieldAdapter(ABC): # pylint: disable=too-few-public-methods @abstractmethod def create( self, @@ -33,7 +33,9 @@ class AbstractEncryptedFieldAdapter(ABC): pass -class SQLAlchemyUtilsAdapter(AbstractEncryptedFieldAdapter): +class SQLAlchemyUtilsAdapter( # pylint: disable=too-few-public-methods + AbstractEncryptedFieldAdapter +): def create( self, app_config: Optional[Dict[str, Any]], diff --git a/superset/utils/profiler.py b/superset/utils/profiler.py index 087ec60acb..269cf5c33b 100644 --- a/superset/utils/profiler.py +++ b/superset/utils/profiler.py @@ -27,7 +27,7 @@ except ModuleNotFoundError: Profiler = None -class SupersetProfiler: +class SupersetProfiler: # pylint: disable=too-few-public-methods """ WSGI middleware to instrument Superset.