MCPcopy Create free account
hub / github.com/copier-org/copier / data_switch

Method data_switch

copier/_cli.py:184–193  ·  view source on GitHub ↗

Update [data][] with provided values. Arguments: values: The list of values to apply. Each value in the list is of the following form: `NAME=VALUE`.

(self, values: Iterable[str])

Source from the content-addressed store, hash-verified

182 help="Make VARIABLE available as VALUE when rendering the template",
183 )
184 def data_switch(self, values: Iterable[str]) -> None:
185 """Update [data][] with provided values.
186
187 Arguments:
188 values: The list of values to apply.
189 Each value in the list is of the following form: `NAME=VALUE`.
190 """
191 for arg in values:
192 key, value = arg.split("=", 1)
193 self.data[key] = value
194
195 @cli.switch(
196 ["--data-file"],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected