diff --git a/.pylintrc b/.pylintrc index 5c0fe878fe..24cfb654d6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -32,7 +32,6 @@ disable= signature-differs, super-init-not-called, unidiomatic-typecheck, - unnecessary-pass, unused-argument, unused-wildcard-import, useless-else-on-loop, diff --git a/horizon/exceptions.py b/horizon/exceptions.py index 01fa4f9f01..ffb721cadd 100644 --- a/horizon/exceptions.py +++ b/horizon/exceptions.py @@ -41,7 +41,6 @@ class HorizonReporterFilter(SafeExceptionReporterFilter): class HorizonException(Exception): """Base exception class for distinguishing our own exception classes.""" - pass class Http302(HorizonException): @@ -149,17 +148,14 @@ class GetFileError(HorizonException): class ConfigurationError(HorizonException): """Exception to be raised when invalid settings have been provided.""" - pass class NotAvailable(HorizonException): """Exception to be raised when something is not available.""" - pass class WorkflowError(HorizonException): """Exception to be raised when something goes wrong in a workflow.""" - pass class WorkflowValidationError(HorizonException): @@ -168,12 +164,10 @@ class WorkflowValidationError(HorizonException): It is raised if required data is missing, or existing data is not valid. """ - pass class MessageFailure(HorizonException): """Exception raised during message notification.""" - pass class HandledException(HorizonException): diff --git a/horizon/forms/fields.py b/horizon/forms/fields.py index 334d86f288..bbcaded887 100644 --- a/horizon/forms/fields.py +++ b/horizon/forms/fields.py @@ -406,13 +406,11 @@ class ThemableDynamicChoiceField(DynamicChoiceField): class DynamicTypedChoiceField(DynamicChoiceField, fields.TypedChoiceField): """Simple mix of ``DynamicChoiceField`` and ``TypedChoiceField``.""" - pass class ThemableDynamicTypedChoiceField(ThemableDynamicChoiceField, fields.TypedChoiceField): """Simple mix of ``ThemableDynamicChoiceField`` & ``TypedChoiceField``.""" - pass class ThemableCheckboxInput(widgets.CheckboxInput): diff --git a/horizon/tables/actions.py b/horizon/tables/actions.py index 30126bbf74..6d672bd87a 100644 --- a/horizon/tables/actions.py +++ b/horizon/tables/actions.py @@ -147,7 +147,6 @@ class BaseAction(html.HTMLElement): By default this method is a no-op. """ - pass def get_default_classes(self): """Returns a list of the default classes for the action. diff --git a/horizon/tabs/base.py b/horizon/tabs/base.py index 9fcf1ec147..67847bf108 100644 --- a/horizon/tabs/base.py +++ b/horizon/tabs/base.py @@ -201,7 +201,6 @@ class TabGroup(html.HTMLElement): is the fallback handler. By default it's a no-op, but it exists to make redirecting or raising exceptions possible for subclasses. """ - pass def _set_active_tab(self): marked_active = None @@ -456,7 +455,6 @@ class Tab(html.HTMLElement): The default behavior is to ignore POST data. """ - pass class TableTab(Tab): diff --git a/horizon/utils/secret_key.py b/horizon/utils/secret_key.py index c2db4e8486..ca03b64a3c 100644 --- a/horizon/utils/secret_key.py +++ b/horizon/utils/secret_key.py @@ -23,7 +23,6 @@ from oslo_concurrency import lockutils class FilePermissionError(Exception): """The key file permissions are insecure.""" - pass def generate_key(key_length=64): diff --git a/openstack_auth/exceptions.py b/openstack_auth/exceptions.py index 37bbaf5b19..cce0d6543d 100644 --- a/openstack_auth/exceptions.py +++ b/openstack_auth/exceptions.py @@ -14,4 +14,3 @@ class KeystoneAuthException(Exception): """Generic error class to identify and catch our own errors.""" - pass diff --git a/openstack_auth/plugin/base.py b/openstack_auth/plugin/base.py index 634e3f18cc..acbc8df5d5 100644 --- a/openstack_auth/plugin/base.py +++ b/openstack_auth/plugin/base.py @@ -183,7 +183,6 @@ class BasePlugin(object): keystone_exceptions.AuthorizationFailure): LOG.info('Attempted scope to project %s failed, will attempt ' 'to scope to another project.', project.name) - pass else: break @@ -231,7 +230,6 @@ class BasePlugin(object): keystone_exceptions.AuthorizationFailure): LOG.info('Attempted scope to domain %s failed, will attempt ' 'to scope to another domain.', domain_name) - pass else: if len(domains) > 1: LOG.info("More than one valid domain found for user %s," diff --git a/openstack_dashboard/api/base.py b/openstack_dashboard/api/base.py index e7d67064aa..68916c88f4 100644 --- a/openstack_dashboard/api/base.py +++ b/openstack_dashboard/api/base.py @@ -317,9 +317,8 @@ def get_url_for_service(service, region, endpoint_type): if endpoint.get('interface') == interface: return endpoint.get('url') except (IndexError, KeyError): - """it could be that the current endpoint just doesn't match the - type, continue trying the next one - """ + # it could be that the current endpoint just doesn't match the + # type, continue trying the next one pass return None