Skip to content

Commit a98be63

Browse files
tonybaloneykimadelineKartik Raj
authored
Update incorrect JSDoc annotations (microsoft#12101)
* Update incorrect JSDoc annotations * Create 12101.md * Update src/client/common/utils/cacheUtils.ts Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update src/client/datascience/jupyter/kernels/kernelSelector.ts Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update src/client/datascience/jupyter/kernels/kernelSelections.ts Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update src/test/mocks/vsc/uri.ts Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update news/3 Code Health/12101.md Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Kartik Raj <karraj@microsoft.com>
1 parent d71250e commit a98be63

File tree

23 files changed

+49
-16
lines changed

23 files changed

+49
-16
lines changed

news/3 Code Health/12101.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update JSDoc annotations for many of the APIs (thanks [tonybaloney](https://github.com/tonybaloney))

src/client/common/process/pythonDaemonPool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export class PythonDaemonExecutionServicePool extends PythonDaemonFactory implem
106106
* @private
107107
* @template T
108108
* @param {(daemon: IPythonExecutionService) => Promise<T>} cb
109+
* @param daemonLogMessage
109110
* @returns {Promise<T>}
110111
* @memberof PythonDaemonExecutionServicePool
111112
*/
@@ -130,6 +131,7 @@ export class PythonDaemonExecutionServicePool extends PythonDaemonFactory implem
130131
*
131132
* @private
132133
* @param {(daemon: IPythonExecutionService) => ObservableExecutionResult<string>} cb
134+
* @param daemonLogMessage
133135
* @returns {ObservableExecutionResult<string>}
134136
* @memberof PythonDaemonExecutionServicePool
135137
*/

src/client/common/terminal/environmentActivationProviders/condaActivationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class CondaActivationCommandProvider implements ITerminalActivationComman
129129
* This configuration is documented on Conda.
130130
* Extension will not attempt to work around issues by trying to setup shell for user.
131131
*
132-
* @param {string} envName
132+
* @param {string} condaEnv
133133
* @returns {(Promise<string[] | undefined>)}
134134
* @memberof CondaActivationCommandProvider
135135
*/

src/client/common/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ export interface ICryptoUtils {
571571
* @returns hash as number, or string
572572
* @param data The string to hash
573573
* @param hashFormat Return format of the hash, number or string
574+
* @param [algorithm]
574575
*/
575576
createHash<E extends keyof IHashFormat>(
576577
data: string,

src/client/common/utils/cacheUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const resourceSpecificCacheStores = new Map<string, Map<string, CacheData>>();
2323
* Get a cache key specific to a resource (i.e. workspace)
2424
* This key will be used to cache interpreter related data, hence the Python Path
2525
* used in a workspace will affect the cache key.
26-
* @param {String} keyPrefix
2726
* @param {Resource} resource
2827
* @param {VSCodeType} [vscode=require('vscode')]
28+
* @param serviceContainer
2929
* @returns
3030
*/
3131
function getCacheKey(
@@ -70,9 +70,9 @@ function getCacheKey(
7070
}
7171
/**
7272
* Gets the cache store for a resource that's specific to the interpreter.
73-
* @param {string} keyPrefix
7473
* @param {Resource} resource
7574
* @param {VSCodeType} [vscode=require('vscode')]
75+
* @param serviceContainer
7676
* @returns
7777
*/
7878
function getCacheStore(

src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function sortProductsInOrderForInstallation(products: Product[]) {
5757
*
5858
* @export
5959
* @param {Product[]} products
60+
* @param {string} [interpreterName]
6061
* @returns {string}
6162
*/
6263
export function getMessageForLibrariesNotInstalled(products: Product[], interpreterName?: string): string {
@@ -291,7 +292,7 @@ export class JupyterInterpreterDependencyService {
291292
*
292293
* @private
293294
* @param {PythonInterpreter} interpreter
294-
* @param {CancellationToken} [token]
295+
* @param {CancellationToken} [_token]
295296
* @returns {Promise<boolean>}
296297
* @memberof JupyterInterpreterConfigurationService
297298
*/

src/client/datascience/jupyter/jupyterDebugger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener {
243243
* (temporary to hard-code and use these in here).
244244
* The old debugger will soon go away into oblivion...
245245
* @private
246-
* @param {INotebook} notebook
246+
* @param {INotebook} _notebook
247247
* @returns {Promise<string>}
248248
* @memberof JupyterDebugger
249249
*/

src/client/datascience/jupyter/kernels/kernelSelections.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { IKernelSelectionListProvider, IKernelSpecQuickPickItem, LiveKernelModel
2323
* Given a kernel spec, this will return a quick pick item with appropriate display names and the like.
2424
*
2525
* @param {IJupyterKernelSpec} kernelSpec
26+
* @param {IPathUtils} pathUtils
2627
* @returns {IKernelSpecQuickPickItem}
2728
*/
2829
function getQuickPickItemForKernelSpec(
@@ -41,6 +42,7 @@ function getQuickPickItemForKernelSpec(
4142
* Given an active kernel, this will return a quick pick item with appropriate display names and the like.
4243
*
4344
* @param {(LiveKernelModel)} kernel
45+
* @param {IPathUtils} pathUtils
4446
* @returns {IKernelSpecQuickPickItem}
4547
*/
4648
function getQuickPickItemForActiveKernel(kernel: LiveKernelModel, pathUtils: IPathUtils): IKernelSpecQuickPickItem {
@@ -185,6 +187,7 @@ export class KernelSelectionProvider {
185187
/**
186188
* Gets a selection of kernel specs from a remote session.
187189
*
190+
* @param {Resource} resource
188191
* @param {IJupyterSessionManager} sessionManager
189192
* @param {CancellationToken} [cancelToken]
190193
* @returns {Promise<IKernelSpecQuickPickItem[]>}
@@ -222,6 +225,8 @@ export class KernelSelectionProvider {
222225
/**
223226
* Gets a selection of kernel specs for a local session.
224227
*
228+
* @param {Resource} resource
229+
* @param type
225230
* @param {IJupyterSessionManager} [sessionManager]
226231
* @param {CancellationToken} [cancelToken]
227232
* @returns {Promise<IKernelSelectionListProvider>}

src/client/datascience/jupyter/kernels/kernelSelector.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ export class KernelSelector {
8888
/**
8989
* Selects a kernel from a remote session.
9090
*
91+
* @param {Resource} resource
92+
* @param {StopWatch} stopWatch
9193
* @param {IJupyterSessionManager} session
9294
* @param {CancellationToken} [cancelToken]
95+
* @param {IJupyterKernelSpec | LiveKernelModel} [currentKernel]
9396
* @returns {Promise<KernelSpecInterpreter>}
9497
* @memberof KernelSelector
9598
*/
@@ -120,8 +123,12 @@ export class KernelSelector {
120123
/**
121124
* Select a kernel from a local session.
122125
*
126+
* @param {Resource} resource
127+
* @param type
128+
* @param {StopWatch} stopWatch
123129
* @param {IJupyterSessionManager} [session]
124130
* @param {CancellationToken} [cancelToken]
131+
* @param {IJupyterKernelSpec | LiveKernelModel} [currentKernel]
125132
* @returns {Promise<KernelSpecInterpreter>}
126133
* @memberof KernelSelector
127134
*/
@@ -155,8 +162,11 @@ export class KernelSelector {
155162
* Gets a kernel that needs to be used with a local session.
156163
* (will attempt to find the best matching kernel, or prompt user to use current interpreter or select one).
157164
*
165+
* @param {Resource} resource
166+
* @param type
158167
* @param {IJupyterSessionManager} [sessionManager]
159168
* @param {nbformat.INotebookMetadata} [notebookMetadata]
169+
* @param {boolean} [disableUI]
160170
* @param {CancellationToken} [cancelToken]
161171
* @returns {Promise<KernelSpecInterpreter>}
162172
* @memberof KernelSelector
@@ -213,6 +223,7 @@ export class KernelSelector {
213223
* Gets a kernel that needs to be used with a remote session.
214224
* (will attempt to find the best matching kernel, or prompt user to use current interpreter or select one).
215225
*
226+
* @param {Resource} resource
216227
* @param {IJupyterSessionManager} [sessionManager]
217228
* @param {nbformat.INotebookMetadata} [notebookMetadata]
218229
* @param {CancellationToken} [cancelToken]
@@ -439,9 +450,12 @@ export class KernelSelector {
439450
* Otherwise, if not provided user is changing the kernel after starting a notebook.
440451
*
441452
* @private
453+
* @param {Resource} resource
442454
* @param {PythonInterpreter} interpreter
455+
* @param type
443456
* @param {string} [displayNameOfKernelNotFound]
444457
* @param {IJupyterSessionManager} [session]
458+
* @param {boolean} [disableUI]
445459
* @param {CancellationToken} [cancelToken]
446460
* @returns {Promise<KernelSpecInterpreter>}
447461
* @memberof KernelSelector

src/client/datascience/jupyter/kernels/kernelService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ export class KernelService {
276276
* - env = Will have environment variables of the activated environment.
277277
*
278278
* @param {PythonInterpreter} interpreter
279+
* @param {boolean} [disableUI]
279280
* @param {CancellationToken} [cancelToken]
280281
* @returns {Promise<IJupyterKernelSpec>}
281282
* @memberof KernelService

0 commit comments

Comments
 (0)