Trivial: Fix docs for functions

This patch fixes some comments in code:
 - Now suffixes can be string in _merge_candidates()
 - Remove old doc for `allow_forbidden` parameter in
   RequestGroup.dict_from_request
 - Delete unnecessary space in ResourceClassCache

Change-Id: I6ffc19eea84b45dd452bc61d2a2007b6572719ad
This commit is contained in:
Tetsuro Nakamura 2019-07-09 07:42:56 +00:00
parent 7f72d1e30e
commit 23300f2813
3 changed files with 3 additions and 4 deletions

View File

@ -197,8 +197,7 @@ class RequestGroup(object):
If a trait in the required parameter is prefixed with ``!`` this
indicates that that trait must not be present on the resource
providers in the group. That is, the trait is forbidden. Forbidden
traits are only processed if ``allow_forbidden`` is True. This allows
the caller to control processing based on microversion handling.
traits are processed only if the microversion supports.
The return is a dict, keyed by the suffix of these RequestGroup
instances (or the empty string for the unidentified group).

View File

@ -735,7 +735,7 @@ def _merge_candidates(candidates, rw_ctx):
For that merged list of alloc_reqs, a corresponding provider_summaries is
produced.
:param candidates: A dict, keyed by integer suffix or '', of tuples of
:param candidates: A dict, keyed by suffix string or '', of tuples of
(allocation_requests, provider_summaries) to be merged.
:param rw_ctx: RequestWideSearchContext.
:return: A tuple of (allocation_requests, provider_summaries).

View File

@ -52,7 +52,7 @@ def _refresh_from_db(ctx, cache):
class ResourceClassCache(object):
"""A cache of integer and string lookup values for resource classes."""
"""A cache of integer and string lookup values for resource classes."""
def __init__(self, ctx):
"""Initialize the cache of resource class identifiers.