pkgcore.restrictions.restriction module¶
base restriction class
- class pkgcore.restrictions.restriction.AlwaysBool(*a, **kw)[source]¶
- Bases: - base- restriction that always yields a specific boolean - negate¶
 - type¶
 
- class pkgcore.restrictions.restriction.AnyMatch(*a, **kw)[source]¶
- Bases: - base- Apply a nested restriction to every item in a sequence. - negate¶
 - restriction¶
 - type¶
 
- class pkgcore.restrictions.restriction.FakeType(*a, **kw)[source]¶
- Bases: - base- wrapper to wrap and fake a node_type - type¶
 
- class pkgcore.restrictions.restriction.Negate(*a, **kw)[source]¶
- Bases: - base- wrap and negate a restriction instance - type¶
 
- class pkgcore.restrictions.restriction.base(*a, **kw)[source]¶
- Bases: - SlotsPicklingMixin- base restriction matching object. - all derivatives should be __slots__ based (lot of instances may wind up in memory). - package_matching = False¶
 
- pkgcore.restrictions.restriction.curry_node_type(cls, node_type, extradoc=None)[source]¶
- Helper function for creating restrictions of a certain type. - This uses - partialto pass a node_type to the wrapped class, and extends the docstring.- Parameters:
- cls – callable (usually a class) that is wrapped. 
- node_type – value passed as node_type. 
- extradoc – addition to the docstring. Defaults to “Automatically set to %s type.” % node_type 
 
- Returns:
- a wrapped callable.