|
2 | 2 | // Licensed under the MIT License. |
3 | 3 |
|
4 | 4 | import { |
5 | | - Uri, |
6 | 5 | Disposable, |
7 | | - MarkdownString, |
8 | 6 | Event, |
| 7 | + FileChangeType, |
9 | 8 | LogOutputChannel, |
10 | | - ThemeIcon, |
11 | | - Terminal, |
| 9 | + MarkdownString, |
12 | 10 | TaskExecution, |
| 11 | + Terminal, |
13 | 12 | TerminalOptions, |
14 | | - FileChangeType, |
| 13 | + ThemeIcon, |
| 14 | + Uri, |
15 | 15 | } from 'vscode'; |
16 | 16 |
|
17 | 17 | /** |
@@ -333,7 +333,7 @@ export interface QuickCreateConfig { |
333 | 333 | */ |
334 | 334 | export interface EnvironmentManager { |
335 | 335 | /** |
336 | | - * The name of the environment manager. |
| 336 | + * The name of the environment manager. Allowed characters (a-z, A-Z, 0-9, -, _). |
337 | 337 | */ |
338 | 338 | readonly name: string; |
339 | 339 |
|
@@ -374,7 +374,7 @@ export interface EnvironmentManager { |
374 | 374 |
|
375 | 375 | /** |
376 | 376 | * The quick create details for the environment manager. Having this method also enables the quick create feature |
377 | | - * for the environment manager. |
| 377 | + * for the environment manager. Should Implement {@link EnvironmentManager.create} to support quick create. |
378 | 378 | */ |
379 | 379 | quickCreateConfig?(): QuickCreateConfig | undefined; |
380 | 380 |
|
@@ -564,7 +564,7 @@ export interface DidChangePackagesEventArgs { |
564 | 564 | */ |
565 | 565 | export interface PackageManager { |
566 | 566 | /** |
567 | | - * The name of the package manager. |
| 567 | + * The name of the package manager. Allowed characters (a-z, A-Z, 0-9, -, _). |
568 | 568 | */ |
569 | 569 | name: string; |
570 | 570 |
|
@@ -596,7 +596,7 @@ export interface PackageManager { |
596 | 596 | /** |
597 | 597 | * Installs/Uninstall packages in the specified Python environment. |
598 | 598 | * @param environment - The Python environment in which to install packages. |
599 | | - * @param packages - The packages to install. |
| 599 | + * @param options - Options for managing packages. |
600 | 600 | * @returns A promise that resolves when the installation is complete. |
601 | 601 | */ |
602 | 602 | manage(environment: PythonEnvironment, options: PackageManagementOptions): Promise<void>; |
@@ -667,9 +667,14 @@ export interface PythonProjectCreatorOptions { |
667 | 667 | name: string; |
668 | 668 |
|
669 | 669 | /** |
670 | | - * Optional path that may be provided as a root for the project. |
| 670 | + * Path provided as the root for the project. |
671 | 671 | */ |
672 | | - uri?: Uri; |
| 672 | + rootUri: Uri; |
| 673 | + |
| 674 | + /** |
| 675 | + * Boolean indicating whether the project should be created without any user input. |
| 676 | + */ |
| 677 | + quickCreate?: boolean; |
673 | 678 | } |
674 | 679 |
|
675 | 680 | /** |
@@ -702,11 +707,20 @@ export interface PythonProjectCreator { |
702 | 707 | readonly iconPath?: IconPath; |
703 | 708 |
|
704 | 709 | /** |
705 | | - * Creates a new Python project or projects. |
706 | | - * @param options - Optional parameters for creating the Python project. |
707 | | - * @returns A promise that resolves to a Python project, an array of Python projects, or undefined. |
| 710 | + * Creates a new Python project(s) or, if files are not a project, returns Uri(s) to the created files. |
| 711 | + * Anything that needs its own python environment constitutes a project. |
| 712 | + * @param options Optional parameters for creating the Python project. |
| 713 | + * @returns A promise that resolves to one of the following: |
| 714 | + * - PythonProject or PythonProject[]: when a single or multiple projects are created. |
| 715 | + * - Uri or Uri[]: when files are created that do not constitute a project. |
| 716 | + * - undefined: if project creation fails. |
| 717 | + */ |
| 718 | + create(options?: PythonProjectCreatorOptions): Promise<PythonProject | PythonProject[] | Uri | Uri[] | undefined>; |
| 719 | + |
| 720 | + /** |
| 721 | + * A flag indicating whether the project creator supports quick create where no user input is required. |
708 | 722 | */ |
709 | | - create(options?: PythonProjectCreatorOptions): Promise<PythonProject | PythonProject[] | undefined>; |
| 723 | + readonly supportsQuickCreate?: boolean; |
710 | 724 | } |
711 | 725 |
|
712 | 726 | /** |
|
0 commit comments