stubber.utils.config ==================== .. py:module:: stubber.utils.config .. autoapi-nested-parse:: stubber configuration Attributes ---------- .. autoapisummary:: stubber.utils.config.FALLBACK_VERSIONS stubber.utils.config.CONFIG Classes ------- .. autoapisummary:: stubber.utils.config.StubberConfig Functions --------- .. autoapisummary:: stubber.utils.config.readconfig Module Contents --------------- .. py:data:: FALLBACK_VERSIONS :value: ['1.17', '1.18', '1.19', '1.19.1', '1.20.0', '1.20.1', '1.21.0', '1.22.0', '1.22.1', '1.22.2',... .. py:class:: StubberConfig(section_name: Optional[str] = None, sources: Optional[List[typedconfig.source.ConfigSource]] = None, provider: Optional[typedconfig.provider.ConfigProvider] = None) Bases: :py:obj:`typedconfig.config.Config` Base class for all configuration objects .. py:attribute:: _config_path :value: None stubber configuration class .. py:attribute:: fallback_path :type: pathlib.Path :value: None a Path to the fallback stubs directory .. py:attribute:: repo_path :type: pathlib.Path :value: None a Path to the repo directory .. py:attribute:: mpy_path :type: pathlib.Path :value: None a Path to the micropython folder in the repos directory .. py:attribute:: mpy_lib_path :type: pathlib.Path :value: None a Path to the micropython-lib folder in the repos directory .. py:attribute:: mpy_stubs_path :type: pathlib.Path :value: None a Path to the micropython-stubs folder in the repos directory (or current directory) .. py:attribute:: stable_version :type: str :value: None last published stable .. py:attribute:: preview_version :type: str :value: None current preview version .. py:attribute:: all_versions :value: None list of recent versions .. py:attribute:: BLOCKED_PORTS :value: ['minimal', 'bare-arm'] ports that should be ignored as a source of stubs .. py:property:: repos :type: List[pathlib.Path] return the repo paths .. py:property:: stub_path :type: pathlib.Path return the stubs path in the microypthon-stubs repo .. py:property:: publish_path :type: pathlib.Path return the stubs path in the microypthon-stubs repo .. py:property:: template_path :type: pathlib.Path return the stubs path in the microypthon-stubs repo .. py:property:: config_path :type: pathlib.Path return the config path .. py:method:: 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 .. py:function:: readconfig(location: Optional[pathlib.Path] = None, filename: str = 'pyproject.toml', prefix: str = 'tool.', must_exist: bool = True) read the configuration from the pyproject.toml file .. py:data:: CONFIG stubber configuration singleton