pyproject reading

From setuptools-scm (MIT)

There is no validation occurring, let alone validation against a schema. If there is ever a choice, always choose YAML, not TOML. Eventhough the former is less human friendly.

Not validating inputs is a classic, often avoidable at the cost of effort, exploitable security risk.

class wreck.monkey.pyproject_reading.TOML_RESULT
wreck.monkey.pyproject_reading.TOML_RESULT: dict[str, Any]

TOML dict

class wreck.monkey.pyproject_reading.TOML_LOADER
wreck.monkey.pyproject_reading.TOML_LOADER: collections.abc.Callable[[str], TOML_RESULT]

A function that takes raw TOML str and converts into a TOML dict

wreck.monkey.pyproject_reading.__all__: tuple[str, str, str, str] = ("TOML_LOADER", "TOML_RESULT", "read_toml_content",    "load_toml_or_inline_map")

Module exports

wreck.monkey.pyproject_reading.load_toml_or_inline_map(data)

Load toml data - with a special hack if only an inline map is given

This is a verified, in the unittest, inline map

'{project = {name = "proj", version = "0.0.1"}}'
Parameters:

data (Any | None) – Data read from a toml file

Returns:

toml data as a dict

Return type:

dict[str, Any]

wreck.monkey.pyproject_reading.read_toml_content(path, default=None)

Read a file if not found can return default. If found load file data as TOML

Parameters:
Returns:

TOML as a dict

Return type:

wreck.monkey.pyproject_reading.TOML_RESULT

Raises: