pylint: fix unnecessary-pass warning
Change-Id: Ie2e5c6482a19553f6c73c50555d65834bb62ca9e
This commit is contained in:
parent
3143edef01
commit
f6e1338cde
@ -32,7 +32,6 @@ disable=
|
|||||||
signature-differs,
|
signature-differs,
|
||||||
super-init-not-called,
|
super-init-not-called,
|
||||||
unidiomatic-typecheck,
|
unidiomatic-typecheck,
|
||||||
unnecessary-pass,
|
|
||||||
unused-argument,
|
unused-argument,
|
||||||
unused-wildcard-import,
|
unused-wildcard-import,
|
||||||
useless-else-on-loop,
|
useless-else-on-loop,
|
||||||
|
@ -41,7 +41,6 @@ class HorizonReporterFilter(SafeExceptionReporterFilter):
|
|||||||
|
|
||||||
class HorizonException(Exception):
|
class HorizonException(Exception):
|
||||||
"""Base exception class for distinguishing our own exception classes."""
|
"""Base exception class for distinguishing our own exception classes."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class Http302(HorizonException):
|
class Http302(HorizonException):
|
||||||
@ -149,17 +148,14 @@ class GetFileError(HorizonException):
|
|||||||
|
|
||||||
class ConfigurationError(HorizonException):
|
class ConfigurationError(HorizonException):
|
||||||
"""Exception to be raised when invalid settings have been provided."""
|
"""Exception to be raised when invalid settings have been provided."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class NotAvailable(HorizonException):
|
class NotAvailable(HorizonException):
|
||||||
"""Exception to be raised when something is not available."""
|
"""Exception to be raised when something is not available."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class WorkflowError(HorizonException):
|
class WorkflowError(HorizonException):
|
||||||
"""Exception to be raised when something goes wrong in a workflow."""
|
"""Exception to be raised when something goes wrong in a workflow."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class WorkflowValidationError(HorizonException):
|
class WorkflowValidationError(HorizonException):
|
||||||
@ -168,12 +164,10 @@ class WorkflowValidationError(HorizonException):
|
|||||||
It is raised if required data is missing,
|
It is raised if required data is missing,
|
||||||
or existing data is not valid.
|
or existing data is not valid.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class MessageFailure(HorizonException):
|
class MessageFailure(HorizonException):
|
||||||
"""Exception raised during message notification."""
|
"""Exception raised during message notification."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class HandledException(HorizonException):
|
class HandledException(HorizonException):
|
||||||
|
@ -406,13 +406,11 @@ class ThemableDynamicChoiceField(DynamicChoiceField):
|
|||||||
|
|
||||||
class DynamicTypedChoiceField(DynamicChoiceField, fields.TypedChoiceField):
|
class DynamicTypedChoiceField(DynamicChoiceField, fields.TypedChoiceField):
|
||||||
"""Simple mix of ``DynamicChoiceField`` and ``TypedChoiceField``."""
|
"""Simple mix of ``DynamicChoiceField`` and ``TypedChoiceField``."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ThemableDynamicTypedChoiceField(ThemableDynamicChoiceField,
|
class ThemableDynamicTypedChoiceField(ThemableDynamicChoiceField,
|
||||||
fields.TypedChoiceField):
|
fields.TypedChoiceField):
|
||||||
"""Simple mix of ``ThemableDynamicChoiceField`` & ``TypedChoiceField``."""
|
"""Simple mix of ``ThemableDynamicChoiceField`` & ``TypedChoiceField``."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ThemableCheckboxInput(widgets.CheckboxInput):
|
class ThemableCheckboxInput(widgets.CheckboxInput):
|
||||||
|
@ -147,7 +147,6 @@ class BaseAction(html.HTMLElement):
|
|||||||
|
|
||||||
By default this method is a no-op.
|
By default this method is a no-op.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
def get_default_classes(self):
|
def get_default_classes(self):
|
||||||
"""Returns a list of the default classes for the action.
|
"""Returns a list of the default classes for the action.
|
||||||
|
@ -201,7 +201,6 @@ class TabGroup(html.HTMLElement):
|
|||||||
is the fallback handler. By default it's a no-op, but it exists
|
is the fallback handler. By default it's a no-op, but it exists
|
||||||
to make redirecting or raising exceptions possible for subclasses.
|
to make redirecting or raising exceptions possible for subclasses.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
def _set_active_tab(self):
|
def _set_active_tab(self):
|
||||||
marked_active = None
|
marked_active = None
|
||||||
@ -456,7 +455,6 @@ class Tab(html.HTMLElement):
|
|||||||
|
|
||||||
The default behavior is to ignore POST data.
|
The default behavior is to ignore POST data.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TableTab(Tab):
|
class TableTab(Tab):
|
||||||
|
@ -23,7 +23,6 @@ from oslo_concurrency import lockutils
|
|||||||
|
|
||||||
class FilePermissionError(Exception):
|
class FilePermissionError(Exception):
|
||||||
"""The key file permissions are insecure."""
|
"""The key file permissions are insecure."""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def generate_key(key_length=64):
|
def generate_key(key_length=64):
|
||||||
|
@ -14,4 +14,3 @@
|
|||||||
|
|
||||||
class KeystoneAuthException(Exception):
|
class KeystoneAuthException(Exception):
|
||||||
"""Generic error class to identify and catch our own errors."""
|
"""Generic error class to identify and catch our own errors."""
|
||||||
pass
|
|
||||||
|
@ -183,7 +183,6 @@ class BasePlugin(object):
|
|||||||
keystone_exceptions.AuthorizationFailure):
|
keystone_exceptions.AuthorizationFailure):
|
||||||
LOG.info('Attempted scope to project %s failed, will attempt '
|
LOG.info('Attempted scope to project %s failed, will attempt '
|
||||||
'to scope to another project.', project.name)
|
'to scope to another project.', project.name)
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -231,7 +230,6 @@ class BasePlugin(object):
|
|||||||
keystone_exceptions.AuthorizationFailure):
|
keystone_exceptions.AuthorizationFailure):
|
||||||
LOG.info('Attempted scope to domain %s failed, will attempt '
|
LOG.info('Attempted scope to domain %s failed, will attempt '
|
||||||
'to scope to another domain.', domain_name)
|
'to scope to another domain.', domain_name)
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
if len(domains) > 1:
|
if len(domains) > 1:
|
||||||
LOG.info("More than one valid domain found for user %s,"
|
LOG.info("More than one valid domain found for user %s,"
|
||||||
|
@ -317,9 +317,8 @@ def get_url_for_service(service, region, endpoint_type):
|
|||||||
if endpoint.get('interface') == interface:
|
if endpoint.get('interface') == interface:
|
||||||
return endpoint.get('url')
|
return endpoint.get('url')
|
||||||
except (IndexError, KeyError):
|
except (IndexError, KeyError):
|
||||||
"""it could be that the current endpoint just doesn't match the
|
# it could be that the current endpoint just doesn't match the
|
||||||
type, continue trying the next one
|
# type, continue trying the next one
|
||||||
"""
|
|
||||||
pass
|
pass
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user