Merge "Make __all__ immutable"

This commit is contained in:
Jenkins 2015-10-07 21:36:40 +00:00 committed by Gerrit Code Review
commit cbc2e15adf
27 changed files with 45 additions and 45 deletions

View File

@ -13,7 +13,7 @@
from keystoneauth1.access.access import * # noqa
__all__ = ['AccessInfo',
__all__ = ('AccessInfo',
'AccessInfoV2',
'AccessInfoV3',
'create']
'create')

View File

@ -25,10 +25,10 @@ from keystoneauth1.access import service_providers
STALE_TOKEN_DURATION = 30
__all__ = ['AccessInfo',
__all__ = ('AccessInfo',
'AccessInfoV2',
'AccessInfoV3',
'create']
'create')
@utils.positional()

View File

@ -13,12 +13,12 @@
from keystoneauth1.exceptions import base
__all__ = ['AuthPluginException',
__all__ = ('AuthPluginException',
'MissingAuthPlugin',
'NoMatchingPlugin',
'UnsupportedParameters',
'OptionError',
'MissingRequiredOptions']
'MissingRequiredOptions')
class AuthPluginException(base.ClientException):

View File

@ -11,7 +11,7 @@
# under the License.
__all__ = ['ClientException']
__all__ = ('ClientException',)
class ClientException(Exception):

View File

@ -13,9 +13,9 @@
from keystoneauth1.exceptions import base
__all__ = ['CatalogException',
__all__ = ('CatalogException',
'EmptyCatalog',
'EndpointNotFound']
'EndpointNotFound')
class CatalogException(base.ClientException):

View File

@ -13,12 +13,12 @@
from keystoneauth1.exceptions import base
__all__ = ['ConnectionError',
__all__ = ('ConnectionError',
'ConnectTimeout',
'ConnectFailure',
'SSLError',
'RetriableConnectionFailure',
'UnknownConnectionError']
'UnknownConnectionError')
class RetriableConnectionFailure(Exception):

View File

@ -13,8 +13,8 @@
from keystoneauth1.exceptions import base
__all__ = ['DiscoveryFailure',
'VersionNotAvailable']
__all__ = ('DiscoveryFailure',
'VersionNotAvailable')
class DiscoveryFailure(base.ClientException):

View File

@ -28,7 +28,7 @@ import six
from keystoneauth1.exceptions import base
__all__ = ['HttpError',
__all__ = ('HttpError',
'HTTPClientError',
'BadRequest',
@ -59,7 +59,7 @@ __all__ = ['HttpError',
'GatewayTimeout',
'HttpVersionNotSupported',
'from_response']
'from_response')
class HttpError(base.ClientException):

View File

@ -14,7 +14,7 @@
from keystoneauth1.exceptions import base
__all__ = ['InvalidResponse']
__all__ = ('InvalidResponse',)
class InvalidResponse(base.ClientException):

View File

@ -12,7 +12,7 @@
from keystoneauth1.exceptions import base
__all__ = ['ServiceProviderNotFound']
__all__ = ('ServiceProviderNotFound',)
class ServiceProviderNotFound(base.ClientException):

View File

@ -32,11 +32,11 @@ V2Token = v2.Token
V3Token = v3.Token
V3FederationToken = v3.V3FederationToken
__all__ = ['DiscoveryList',
__all__ = ('DiscoveryList',
'FixtureValidationError',
'V2Discovery',
'V3Discovery',
'V2Token',
'V3Token',
'V3FederationToken',
]
)

View File

@ -12,10 +12,10 @@
from keystoneauth1 import _utils as utils
__all__ = ['DiscoveryList',
__all__ = ('DiscoveryList',
'V2Discovery',
'V3Discovery',
]
)
_DEFAULT_DAYS_AGO = 30

View File

@ -31,7 +31,7 @@ Token = generic.Token
V3OidcPassword = oidc.OidcPassword
V3OidcAuthorizationCode = oidc.OidcAuthorizationCode
__all__ = ['BaseIdentityPlugin',
__all__ = ('BaseIdentityPlugin',
'Password',
'Token',
'V2Password',
@ -39,4 +39,4 @@ __all__ = ['BaseIdentityPlugin',
'V3Password',
'V3Token',
'V3OidcPassword',
'V3OidcAuthorizationCode']
'V3OidcAuthorizationCode')

View File

@ -15,7 +15,7 @@ from keystoneauth1.identity.generic.password import Password # noqa
from keystoneauth1.identity.generic.token import Token # noqa
__all__ = ['BaseGenericPlugin',
__all__ = ('BaseGenericPlugin',
'Password',
'Token',
]
)

View File

@ -18,7 +18,7 @@ from keystoneauth1.identity.v3.token import * # noqa
from keystoneauth1.identity.v3.oidc import * # noqa
__all__ = ['Auth',
__all__ = ('Auth',
'AuthConstructor',
'AuthMethod',
'BaseAuth',
@ -34,4 +34,4 @@ __all__ = ['Auth',
'TokenMethod'
'OidcAuthorizationCode',
'OidcPassword']
'OidcPassword')

View File

@ -21,7 +21,7 @@ from keystoneauth1.identity import base
_logger = utils.get_logger(__name__)
__all__ = ['Auth', 'AuthMethod', 'AuthConstructor', 'BaseAuth']
__all__ = ('Auth', 'AuthMethod', 'AuthConstructor', 'BaseAuth')
@six.add_metaclass(abc.ABCMeta)

View File

@ -17,7 +17,7 @@ import six
from keystoneauth1.identity.v3 import base
from keystoneauth1.identity.v3 import token
__all__ = ['FederationBaseAuth']
__all__ = ('FederationBaseAuth',)
@six.add_metaclass(abc.ABCMeta)

View File

@ -19,7 +19,7 @@ from keystoneauth1.identity.v3 import base
from keystoneauth1.identity.v3 import token
from keystoneauth1 import plugin
__all__ = ['Keystone2Keystone']
__all__ = ('Keystone2Keystone',)
class Keystone2Keystone(base.BaseAuth):

View File

@ -14,8 +14,8 @@ from keystoneauth1 import _utils
from keystoneauth1 import access
from keystoneauth1.identity.v3 import federation
__all__ = ['OidcAuthorizationCode',
'OidcPassword']
__all__ = ('OidcAuthorizationCode',
'OidcPassword')
class _OidcBase(federation.FederationBaseAuth):

View File

@ -13,7 +13,7 @@
from keystoneauth1.identity.v3 import base
__all__ = ['PasswordMethod', 'Password']
__all__ = ('PasswordMethod', 'Password')
class PasswordMethod(base.AuthMethod):

View File

@ -13,7 +13,7 @@
from keystoneauth1.identity.v3 import base
__all__ = ['TokenMethod', 'Token']
__all__ = ('TokenMethod', 'Token')
class TokenMethod(base.AuthMethod):

View File

@ -32,7 +32,7 @@ load_session_from_conf_options = session.load_from_conf_options
get_session_conf_options = session.get_conf_options
__all__ = [
__all__ = (
# loading.base
'BaseLoader',
'get_available_plugin_names',
@ -59,4 +59,4 @@ __all__ = [
# loading.opts
'Opt',
]
)

View File

@ -20,12 +20,12 @@ from keystoneauth1 import exceptions
PLUGIN_NAMESPACE = 'keystoneauth1.plugin'
__all__ = ['get_available_plugin_names',
__all__ = ('get_available_plugin_names',
'get_available_plugin_loaders',
'get_plugin_loader',
'get_plugin_options',
'BaseLoader',
'PLUGIN_NAMESPACE']
'PLUGIN_NAMESPACE')
def get_available_plugin_names():

View File

@ -17,8 +17,8 @@ from keystoneauth1 import _utils as utils
from keystoneauth1.loading import base
__all__ = ['register_argparse_arguments',
'load_from_argparse_arguments']
__all__ = ('register_argparse_arguments',
'load_from_argparse_arguments')
def _register_plugin_argparse_arguments(parser, plugin):

View File

@ -21,10 +21,10 @@ _section_help = 'Config Section from which to load plugin specific options'
_AUTH_SECTION_OPT = opts.Opt('auth_section', help=_section_help)
__all__ = ['get_common_conf_options',
__all__ = ('get_common_conf_options',
'get_plugin_conf_options',
'register_conf_options',
'load_from_conf_options']
'load_from_conf_options')
def get_common_conf_options():

View File

@ -21,7 +21,7 @@ except ImportError:
from keystoneauth1 import _utils as utils
__all__ = ['Opt']
__all__ = ('Opt',)
class Opt(object):

View File

@ -23,11 +23,11 @@ from keystoneauth1.loading import base
from keystoneauth1 import session
__all__ = ['register_argparse_arguments',
__all__ = ('register_argparse_arguments',
'load_from_argparse_arguments',
'register_conf_options',
'load_from_conf_options',
'get_conf_options']
'get_conf_options')
def _positive_non_zero_float(argument_value):