The ide_config.py
module#
Summary#
Find the ansys-mechanical-stubs installation location in site-packages. |
|
Retrieve the revision numbers in ansys-mechanical-stubs. |
|
CLI tool to update settings.json files for autocomplete with ansys-mechanical-stubs. |
Description#
Convenience CLI to run mechanical.
Module detail#
- ide_config.get_stubs_location()#
Find the ansys-mechanical-stubs installation location in site-packages.
- Returns:
pathlib.Path
The path to the ansys-mechanical-stubs installation in site-packages.
- ide_config.get_stubs_versions(stubs_location: pathlib.Path)#
Retrieve the revision numbers in ansys-mechanical-stubs.
- Parameters:
- pathlib.Path
The path to the ansys-mechanical-stubs installation in site-packages.
- Returns:
list
The list containing minimum and maximum versions in the ansys-mechanical-stubs package.
- ide_config.cli(ide: str, target: str, revision: int) None #
CLI tool to update settings.json files for autocomplete with ansys-mechanical-stubs.
- Parameters:
- ide: str
The IDE to set up autocomplete settings. By default, it’s
vscode
.- target: str
The type of settings to update. Either “user” or “workspace” in VS Code. By default, it’s
user
.- revision: int
The Mechanical revision number. For example, “242”. If unspecified, it finds the default Mechanical version from ansys-tools-path.