micropy.stubs.source

micropy.stubs.source

This module contains abstractions for handling stub sources and their location.

Functions

cast(typ, val)

Cast a value to a type.

contextmanager(func)

@contextmanager decorator.

get_source(location, **kwargs)

Factory for StubSource Instance.

reduce(function, iterable[, initial])

Apply a function of two arguments cumulatively to the items of a sequence or iterable, from left to right, so as to reduce the iterable to a single value.

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

ExitStack()

Context manager for dynamic management of a stack of exit callbacks.

LocateStrategy(*args, **kwargs)

Log()

Borg for easy access to any Log from anywhere in the package.

Path(*args, **kwargs)

PurePath subclass that can make system calls.

Protocol()

Base class for protocol classes.

RemoteStubLocator()

Stub Source for remote locations.

RepoStubLocator(repo)

StubInfoSpecLocator()

StubSource([locators, location])

Handles sourcing stubs.

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.