vscode#

Helper functions for modifying a VSCode configuration.

RemovedKeys = collections.abc.Iterable[str] | dict[str, 'RemovedKeys']#

Type for keys to be removed from a (nested) dictionary.

class ModifiableVscodeSettings(document: dict, *, exists: bool)[source]#

Bases: _ModifiableJsonResource

In-memory representation of .vscode/settings.json.

path = PosixPath('.vscode/settings.json')[source]#
remove(keys: Iterable[str] | dict[str, RemovedKeys]) None[source]#
update(new_settings: dict) None[source]#
class ModifiableVscodeExtensions(document: dict, *, exists: bool)[source]#

Bases: _ModifiableJsonResource

In-memory representation of .vscode/extensions.json.

path = PosixPath('.vscode/extensions.json')[source]#
get_unwanted() set[str][source]#
add_recommendation(extension_name: str) None[source]#
add_unwanted(extension_name: str) None[source]#
remove_recommendation(extension_name: str, *, unwanted: bool = False) None[source]#
get_unwanted_extensions(session: Session, /) set[str][source]#
remove_settings(session: Session, /, keys: RemovedKeys) None[source]#
update_settings(session: Session, /, new_settings: dict) None[source]#
add_extension_recommendation(session: Session, /, extension_name: str) None[source]#
add_unwanted_extension(session: Session, /, extension_name: str) None[source]#
remove_extension_recommendation(session: Session, /, extension_name: str, *, unwanted: bool = False) None[source]#