Functions that remove candidates.
Module Attributes
Determines how where matches must be found during filtering operations. |
Functions
|
Prevent mapping if banned substrings are found. |
|
Require a regex match in name, context, and/or candidates. |
Determines how where matches must be found during filtering operations.
alias of Union[Literal[‘name’, ‘context’, ‘candidate’], Iterable[Literal[‘name’, ‘context’, ‘candidate’]]]
Require a regex match in name, context, and/or candidates.
name – A name.
candidates – Potential matches for name.
context – Context in which the function is being called.
regex – A regex pattern to pass to re.compile().
where – Which of (‘name’, ‘candidate’, ‘context’) to match in.
keep_if_match – If False, require that regex does _not_ match to keep candidates.
purpose – A purpose-string used for logging.
Approved candidates.
ValueError – If where contains ‘context’ when context is not given.
See also
The banned_substring() method.
Prevent mapping if banned substrings are found.
Matching on name or context halts all mapping. Matching candidates excludes only those candidates.
name – An element to find matches for.
candidates – Potential matches for name (not used).
context – Context in which the function is being called.
substrings – Substrings which may not be present in name.
where – Which of (‘name’, ‘candidate’, ‘context’) to match in. Empty=all.
Approved candidates.
See also
The require_regex_match() method, which performs the actual work.