MCPcopy Create free account
hub / github.com/psf/black / FakeContext

Class FakeContext

tests/test_black.py:102–108  ·  view source on GitHub ↗

A fake click Context for when calling functions that need it.

Source from the content-addressed store, hash-verified

100
101
102class FakeContext(click.Context):
103 """A fake click Context for when calling functions that need it."""
104
105 def __init__(self) -> None:
106 self.default_map: Dict[str, Any] = {}
107 # Dummy root, since most of the tests don't care about it
108 self.obj: Dict[str, Any] = {"root": PROJECT_ROOT}
109
110
111class FakeParameter(click.Parameter):

Calls

no outgoing calls