stubber.utils.config

Module Contents

Classes

StubberConfig

stubber confguration class

Functions

readconfig([filename, prefix, must_exist])

read the configuration from the pyproject.toml file

Attributes

CONFIG

stubber configuration singleton

class stubber.utils.config.StubberConfig(section_name: Optional[str] = None, sources: Optional[List[typedconfig.source.ConfigSource]] = None, provider: Optional[typedconfig.provider.ConfigProvider] = None)

Bases: typedconfig.config.Config

stubber confguration class

Parameters
  • section_name (Optional[str]) –

  • sources (Optional[List[typedconfig.source.ConfigSource]]) –

  • provider (Optional[typedconfig.provider.ConfigProvider]) –

stub_path

a Path to the stubs directory

fallback_path

a Path to the fallback stubs directory

repo_path

a Path to the repo directory

mpy_path

a Path to the micropython folder in the repos directory

mpy_lib_path

a Path to the micropython-lib folder in the repos directory

publish_path

a Path to the folder where all stub publication artefacts are stored

template_path

a Path to the publication folder that has the template files

STABLE_VERSION = 1.19.1

last published stable

ALL_VERSIONS = ['1.17', '1.18', '1.19', '1.19.1']

list of recent versions

post_read_hook() dict

This method can be overridden to modify config values after read() is called. :rtype: A dict of key-value pairs containing new configuration values for key() items in this Config class

Return type

dict

stubber.utils.config.readconfig(filename: str = 'pyproject.toml', prefix: str = 'tool.', must_exist: bool = True)

read the configuration from the pyproject.toml file

Parameters
  • filename (str) –

  • prefix (str) –

  • must_exist (bool) –

stubber.utils.config.CONFIG

stubber configuration singleton