Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsoulanille committed May 19, 2022
1 parent a3438bc commit cb6be48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tfjs-converter/src/executor/graph_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ export async function loadGraphModel(
return model;
}


/**
* Load a graph model given a synchronous IO handler with a 'load' method.
*
Expand All @@ -484,8 +483,8 @@ export function loadGraphModelSync(
modelSource: io.IOHandlerSync): GraphModel<io.IOHandlerSync> {
if (modelSource == null) {
throw new Error(
'modelUrl in loadGraphModelSync() cannot be null. Please provide a url ' +
'or an IOHandler that loads the model');
'modelUrl in loadGraphModelSync() cannot be null. Please provide a ' +
'url or an IOHandler that loads the model');
}
if (!modelSource.load) {
throw new Error(`modelUrl IO Handler ${modelSource} has no load function`);
Expand All @@ -498,7 +497,7 @@ export function loadGraphModelSync(

function getTFHubUrl(modelUrl: string): string {
if (!modelUrl.endsWith('/')) {
modelUrl = (modelUrl as string) + '/';
modelUrl = (modelUrl) + '/';
}
return `${modelUrl}${DEFAULT_MODEL_NAME}${TFHUB_SEARCH_PARAM}`;
}
3 changes: 2 additions & 1 deletion tfjs-converter/src/executor/graph_model_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ describe('loadGraphModelSync', () => {
} catch (err) {
errorMsg = err.message;
}
expect(errorMsg).toMatch(/modelUrl in loadGraphModelSync\(\) cannot be null/);
expect(errorMsg)
.toMatch(/modelUrl in loadGraphModelSync\(\) cannot be null/);
});
});

Expand Down

0 comments on commit cb6be48

Please sign in to comment.