Skip to content

Commit 0741336

Browse files
committed
refactor: remove trailing comma, add generic pair
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 877ef4e commit 0741336

File tree

6 files changed

+57
-12
lines changed

6 files changed

+57
-12
lines changed

lib/node_modules/@stdlib/math/special/fibonacci/scripts/generate_files.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,13 @@ function generateAddonFile( matches, header, basePkg ) {
183183

184184
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
185185
for ( j = 0; j < outputTypes.length; j++ ) {
186-
cOut += '\t' + matches[ functionIndex ][ 7 ] + ',\n';
186+
cOut += '\t' + matches[ functionIndex ][ 7 ];
187187
functionIndex += 1;
188+
if ( functionIndex < matches.length ) {
189+
cOut += ',\n';
190+
} else {
191+
cOut += '\n';
192+
}
188193
}
189194
cOut += '\n';
190195
}
@@ -198,8 +203,13 @@ function generateAddonFile( matches, header, basePkg ) {
198203

199204
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
200205
for ( j = 0; j < outputTypes.length; j++ ) {
201-
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase() + ',\n';
206+
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase();
202207
functionIndex += 1;
208+
if ( functionIndex < matches.length ) {
209+
cOut += ',\n';
210+
} else {
211+
cOut += '\n';
212+
}
203213
}
204214
cOut += '\n';
205215
}
@@ -213,8 +223,13 @@ function generateAddonFile( matches, header, basePkg ) {
213223

214224
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
215225
for ( j = 0; j < outputTypes.length; j++ ) {
216-
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ] + ',\n';
226+
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ];
217227
functionIndex += 1;
228+
if ( functionIndex < matches.length ) {
229+
cOut += ',\n';
230+
} else {
231+
cOut += '\n';
232+
}
218233
}
219234
cOut += '\n';
220235
}

lib/node_modules/@stdlib/math/special/fibonacci/scripts/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function main() {
250250
*/
251251

252252
if ( inputDtype === 'generic' ) {
253-
continue;
253+
allowedCasts = [ 'generic' ];
254254
} else {
255255
// Get all dtypes this input can be mostly-safely cast to:
256256
allowedCasts = mostlySafeCasts( inputDtype );

lib/node_modules/@stdlib/math/special/sin/scripts/generate_files.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,13 @@ function generateAddonFile( matches, header, basePkg ) {
183183

184184
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
185185
for ( j = 0; j < outputTypes.length; j++ ) {
186-
cOut += '\t' + matches[ functionIndex ][ 7 ] + ',\n';
186+
cOut += '\t' + matches[ functionIndex ][ 7 ];
187187
functionIndex += 1;
188+
if ( functionIndex < matches.length ) {
189+
cOut += ',\n';
190+
} else {
191+
cOut += '\n';
192+
}
188193
}
189194
cOut += '\n';
190195
}
@@ -198,8 +203,13 @@ function generateAddonFile( matches, header, basePkg ) {
198203

199204
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
200205
for ( j = 0; j < outputTypes.length; j++ ) {
201-
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase() + ',\n';
206+
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase();
202207
functionIndex += 1;
208+
if ( functionIndex < matches.length ) {
209+
cOut += ',\n';
210+
} else {
211+
cOut += '\n';
212+
}
203213
}
204214
cOut += '\n';
205215
}
@@ -213,8 +223,13 @@ function generateAddonFile( matches, header, basePkg ) {
213223

214224
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
215225
for ( j = 0; j < outputTypes.length; j++ ) {
216-
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ] + ',\n';
226+
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ];
217227
functionIndex += 1;
228+
if ( functionIndex < matches.length ) {
229+
cOut += ',\n';
230+
} else {
231+
cOut += '\n';
232+
}
218233
}
219234
cOut += '\n';
220235
}

lib/node_modules/@stdlib/math/special/sin/scripts/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function main() {
250250
*/
251251

252252
if ( inputDtype === 'generic' ) {
253-
continue;
253+
allowedCasts = [ 'generic' ];
254254
} else {
255255
// Get all dtypes this input can be mostly-safely cast to:
256256
allowedCasts = mostlySafeCasts( inputDtype );

lib/node_modules/@stdlib/math/special/sqrt/scripts/generate_files.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,13 @@ function generateAddonFile( matches, header, basePkg ) {
183183

184184
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
185185
for ( j = 0; j < outputTypes.length; j++ ) {
186-
cOut += '\t' + matches[ functionIndex ][ 7 ] + ',\n';
186+
cOut += '\t' + matches[ functionIndex ][ 7 ];
187187
functionIndex += 1;
188+
if ( functionIndex < matches.length ) {
189+
cOut += ',\n';
190+
} else {
191+
cOut += '\n';
192+
}
188193
}
189194
cOut += '\n';
190195
}
@@ -198,8 +203,13 @@ function generateAddonFile( matches, header, basePkg ) {
198203

199204
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
200205
for ( j = 0; j < outputTypes.length; j++ ) {
201-
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase() + ',\n';
206+
cOut += '\tSTDLIB_NDARRAY_' + matches[ functionIndex ][ 0 ].toUpperCase() + ', STDLIB_NDARRAY_' + matches[ functionIndex ][ 1 ].toUpperCase();
202207
functionIndex += 1;
208+
if ( functionIndex < matches.length ) {
209+
cOut += ',\n';
210+
} else {
211+
cOut += '\n';
212+
}
203213
}
204214
cOut += '\n';
205215
}
@@ -213,8 +223,13 @@ function generateAddonFile( matches, header, basePkg ) {
213223

214224
cOut += '\t// ' + inputType + ' (' + outputTypes.length + ')\n';
215225
for ( j = 0; j < outputTypes.length; j++ ) {
216-
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ] + ',\n';
226+
cOut += '\t(void *)' + matches[ functionIndex ][ 6 ];
217227
functionIndex += 1;
228+
if ( functionIndex < matches.length ) {
229+
cOut += ',\n';
230+
} else {
231+
cOut += '\n';
232+
}
218233
}
219234
cOut += '\n';
220235
}

lib/node_modules/@stdlib/math/special/sqrt/scripts/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function main() {
250250
*/
251251

252252
if ( inputDtype === 'generic' ) {
253-
continue;
253+
allowedCasts = [ 'generic' ];
254254
} else {
255255
// Get all dtypes this input can be mostly-safely cast to:
256256
allowedCasts = mostlySafeCasts( inputDtype );

0 commit comments

Comments
 (0)