check-param-names (#18189)

This commit is contained in:
Charles Gagnon
2022-01-31 12:39:22 -08:00
committed by GitHub
parent 7149bbd591
commit 1c9ba64ee0
47 changed files with 96 additions and 80 deletions

View File

@@ -345,6 +345,7 @@ export class BookModel {
/**
* Recursively parses out a section of a Jupyter Book.
* @param version
* @param section The input data to parse
*/
public parseJupyterSections(version: string, section: any[]): JupyterBookSection[] {

View File

@@ -325,7 +325,7 @@ export class BookTocManager implements IBookTocManager {
* Moves a section to a book top level or another book's section. If there's a target section we add the the targetSection directory if it has one and append it to the
* notebook's path. The overwrite option is set to false to prevent any issues with duplicated file names.
* @param section The section that's been moved.
* @param book The target book.
* @param bookItem The target book.
*/
async moveSectionFiles(section: BookTreeItem, bookItem: BookTreeItem): Promise<void> {
const uri = path.posix.join(path.posix.sep, path.relative(section.rootContentPath, section.book.contentPath));
@@ -369,8 +369,8 @@ export class BookTocManager implements IBookTocManager {
/**
* Moves a file to a book top level or a book's section. If there's a target section we add the the targetSection directory if it has one and append it to the
* files's path. The overwrite option is set to false to prevent any issues with duplicated file names.
* @param element Notebook, Markdown File, or book's notebook that will be added to the book.
* @param targetBook Book that will be modified.
* @param file Notebook, Markdown File, or book's notebook that will be added to the book.
* @param book Book that will be modified.
*/
async moveFile(file: BookTreeItem, book: BookTreeItem): Promise<void> {
const rootPath = book.rootContentPath;

View File

@@ -330,7 +330,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
* were able to successfully parse it.
* @param bookPath The path to the book folder to create the model for
* @param isNotebook A boolean value to know we are creating a model for a notebook or a book
* @param notebookBookRoot For pinned notebooks we need to know if the notebook is part of a book or it's a standalone notebook
* @param notebookDetails
*/
private async createAndAddBookModel(bookPath: string, isNotebook: boolean, notebookDetails?: IPinnedNotebook): Promise<void> {
if (!this.books.find(x => x.bookPath === bookPath)) {

View File

@@ -45,8 +45,6 @@ export function jsIndexToCharIndex(jsIdx: number, text: string): number {
/**
* Get the diff between pure character count and JS-based count with 2 chars per surrogate pair.
*
* @param charIdx - The index in unicode characters
*
* @param text - The text in which the offset is calculated
*
* @returns The js-native index