pylint: fix unnecessary-pass warning

Change-Id: Ie2e5c6482a19553f6c73c50555d65834bb62ca9e
This commit is contained in:
Akihiro Motoki 2018-12-02 05:55:14 +09:00
parent 3143edef01
commit f6e1338cde
9 changed files with 2 additions and 19 deletions

View File

@ -32,7 +32,6 @@ disable=
signature-differs,
super-init-not-called,
unidiomatic-typecheck,
unnecessary-pass,
unused-argument,
unused-wildcard-import,
useless-else-on-loop,

View File

@ -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):

View File

@ -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):

View File

@ -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.

View File

@ -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):

View File

@ -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):

View File

@ -14,4 +14,3 @@
class KeystoneAuthException(Exception):
"""Generic error class to identify and catch our own errors."""
pass

View File

@ -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,"

View File

@ -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