diff --git a/keystonemiddleware/audit.py b/keystonemiddleware/audit.py index 115071cd..23f7b18c 100644 --- a/keystonemiddleware/audit.py +++ b/keystonemiddleware/audit.py @@ -12,7 +12,7 @@ # under the License. """ -Build open standard audit information based on incoming requests +Build open standard audit information based on incoming requests. AuditMiddleware filter should be placed after keystonemiddleware.auth_token in the pipeline so that it can utilise the information the Identity server @@ -223,7 +223,7 @@ class OpenStackAuditApi(object): return service def _build_typeURI(self, req, service_type): - """Build typeURI of target + """Build typeURI of target. Combines service type and corresponding path for greater detail. """ @@ -254,7 +254,7 @@ class OpenStackAuditApi(object): return target def get_target_resource(self, req): - """Retrieve target information + """Retrieve target information. If discovery is enabled, target will attempt to retrieve information from service catalog. If not, the information will be taken from @@ -351,7 +351,7 @@ class AuditMiddleware(object): os.path.basename(sys.argv[0])) def _emit_audit(self, context, event_type, payload): - """Emit audit notification + """Emit audit notification. if oslo.messaging enabled, send notification. if not, log event. """ diff --git a/keystonemiddleware/auth_token/__init__.py b/keystonemiddleware/auth_token/__init__.py index 03d8a3c2..88360b90 100644 --- a/keystonemiddleware/auth_token/__init__.py +++ b/keystonemiddleware/auth_token/__init__.py @@ -14,7 +14,7 @@ # limitations under the License. """ -Token-based Authentication Middleware +Token-based Authentication Middleware. This WSGI component: @@ -529,7 +529,7 @@ class BaseAuthProtocol(object): raise ksm_exceptions.InvalidToken(_('Token authorization failed')) def _do_fetch_token(self, token): - """Helper method to fetch a token and convert it into an AccessInfo""" + """Helper method to fetch a token and convert it into an AccessInfo.""" data = self.fetch_token(token) try: diff --git a/keystonemiddleware/auth_token/_memcache_pool.py b/keystonemiddleware/auth_token/_memcache_pool.py index a3b6b256..ed844f8d 100644 --- a/keystonemiddleware/auth_token/_memcache_pool.py +++ b/keystonemiddleware/auth_token/_memcache_pool.py @@ -37,7 +37,7 @@ class ConnectionGetTimeoutException(Exception): class ConnectionPool(queue.Queue): - """Base connection pool class + """Base connection pool class. This class implements the basic connection pool logic as an abstract base class. diff --git a/keystonemiddleware/auth_token/_request.py b/keystonemiddleware/auth_token/_request.py index 7a6a25ae..f64ef28a 100644 --- a/keystonemiddleware/auth_token/_request.py +++ b/keystonemiddleware/auth_token/_request.py @@ -188,7 +188,7 @@ class _AuthTokenRequest(webob.Request): self._set_auth_headers(auth_ref, self._SERVICE_HEADER_PREFIX) def _all_auth_headers(self): - """All the authentication headers that can be set on the request""" + """All the authentication headers that can be set on the request.""" yield self._SERVICE_CATALOG_HEADER yield self._USER_STATUS_HEADER yield self._SERVICE_STATUS_HEADER @@ -227,7 +227,7 @@ class _AuthTokenRequest(webob.Request): @property def token_auth(self): - """The auth plugin that will be associated with this request""" + """The auth plugin that will be associated with this request.""" return self.environ.get(self._TOKEN_AUTH) @token_auth.setter @@ -236,7 +236,7 @@ class _AuthTokenRequest(webob.Request): @property def token_info(self): - """The raw token dictionary retrieved by the middleware""" + """The raw token dictionary retrieved by the middleware.""" return self.environ.get(self._TOKEN_INFO) @token_info.setter diff --git a/keystonemiddleware/echo/service.py b/keystonemiddleware/echo/service.py index 277cc027..4824f778 100644 --- a/keystonemiddleware/echo/service.py +++ b/keystonemiddleware/echo/service.py @@ -12,7 +12,9 @@ # limitations under the License. """ -Run the echo service directly on port 8000 by executing the following:: +Run the echo service. + +The echo service can be run on port 8000 by executing the following:: $ python -m keystonemiddleware.echo diff --git a/keystonemiddleware/s3_token.py b/keystonemiddleware/s3_token.py index 2ce284c7..c2a67158 100644 --- a/keystonemiddleware/s3_token.py +++ b/keystonemiddleware/s3_token.py @@ -20,7 +20,7 @@ # See them for their copyright. """ -S3 Token Middleware +S3 Token Middleware. This WSGI component: diff --git a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py index b2572a0f..6493422b 100644 --- a/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py +++ b/keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py @@ -1511,7 +1511,7 @@ class v2AuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest, self.set_middleware() def assert_unscoped_default_tenant_auto_scopes(self, token): - """Unscoped v2 requests with a default tenant should "auto-scope." + """Unscoped v2 requests with a default tenant should ``auto-scope``. The implied scope is the user's tenant ID. diff --git a/tox.ini b/tox.ini index 8347c7d0..8ce07231 100644 --- a/tox.ini +++ b/tox.ini @@ -46,8 +46,7 @@ commands = oslo_debug_helper {posargs} # D204: 1 blank line required after class docstring # D209: Multi-line docstring closing quotes should be on a separate line # D301: Use r""" if any backslashes in a docstring -# D400: First line should end with a period -ignore = D100,D101,D102,D103,D104,D105,D200,D202,D209,D301,D204,D400 +ignore = D100,D101,D102,D103,D104,D105,D200,D202,D209,D301,D204 show-source = True exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*