MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / committer_factory

Function committer_factory

commitizen/factory.py:7–17  ·  view source on GitHub ↗

Return the correct commitizen existing in the registry.

(config: BaseConfig)

Source from the content-addressed store, hash-verified

5
6
7def committer_factory(config: BaseConfig) -> BaseCommitizen:
8 """Return the correct commitizen existing in the registry."""
9 name: str = config.settings["name"]
10 try:
11 return registry[name](config)
12 except KeyError:
13 msg_error = (
14 "The committer has not been found in the system.\n\n"
15 f"Try running 'pip install {name}'\n"
16 )
17 raise NoCommitizenFoundException(msg_error)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected