From 43e82945fd3316e0bdb3cd6b9c2f9ecaa0946226 Mon Sep 17 00:00:00 2001 From: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:21:01 +0000 Subject: [PATCH] style: apply automated linter fixes --- packages/safe-ds-lang/tests/helpers/testResources.ts | 6 ++++-- .../safe-ds-lang/tests/language/generation/creator.ts | 2 +- .../language/generation/safe-ds-python-generator.test.ts | 8 +------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/safe-ds-lang/tests/helpers/testResources.ts b/packages/safe-ds-lang/tests/helpers/testResources.ts index fdeafcaf1..87bf7d788 100644 --- a/packages/safe-ds-lang/tests/helpers/testResources.ts +++ b/packages/safe-ds-lang/tests/helpers/testResources.ts @@ -51,7 +51,9 @@ export const uriToShortenedTestResourceName = ( */ export const listTestSafeDsFiles = (rootTestResourceName: TestResourceName): URI[] => { const rootPath = testResourceNameToUri(rootTestResourceName).fsPath; - return listTestFilesWithExtensions(rootTestResourceName, SAFE_DS_FILE_EXTENSIONS).filter(uri => isNotSkipped(path.relative(rootPath, uri.fsPath))); + return listTestFilesWithExtensions(rootTestResourceName, SAFE_DS_FILE_EXTENSIONS).filter((uri) => + isNotSkipped(path.relative(rootPath, uri.fsPath)), + ); }; /** @@ -62,7 +64,7 @@ export const listTestSafeDsFiles = (rootTestResourceName: TestResourceName): URI * @return URIs of the discovered files. */ export const listTestFilesWithExtensions = (rootTestResourceName: TestResourceName, extensions: string[]): URI[] => { - const pattern = `**/*.{${extensions.join(",")}}`; + const pattern = `**/*.{${extensions.join(',')}}`; const cwd = testResourceNameToUri(rootTestResourceName).fsPath; return globSync(pattern, { cwd, nodir: true }).map((it) => URI.file(path.join(cwd, it))); diff --git a/packages/safe-ds-lang/tests/language/generation/creator.ts b/packages/safe-ds-lang/tests/language/generation/creator.ts index 23ac576bf..583d17afc 100644 --- a/packages/safe-ds-lang/tests/language/generation/creator.ts +++ b/packages/safe-ds-lang/tests/language/generation/creator.ts @@ -92,7 +92,7 @@ const createGenerationTest = async (parentDirectory: URI, inputUris: URI[]): Pro * @param actualOutputRoot Where the actual output files supposed to be located. */ const readExpectedOutputFiles = (expectedOutputRoot: URI, actualOutputRoot: URI): ExpectedOutputFile[] => { - return listTestFilesWithExtensions(uriToShortenedTestResourceName(expectedOutputRoot), ["py", "map"]).map((uri) => { + return listTestFilesWithExtensions(uriToShortenedTestResourceName(expectedOutputRoot), ['py', 'map']).map((uri) => { return { uri: URI.file(path.join(actualOutputRoot.fsPath, path.relative(expectedOutputRoot.fsPath, uri.fsPath))), code: fs.readFileSync(uri.fsPath).toString(), diff --git a/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts b/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts index d203c6594..769b37c1f 100644 --- a/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts +++ b/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts @@ -31,13 +31,7 @@ describe('generation', async () => { // Generate code for all documents const actualOutputs = stream(documents) - .flatMap((document) => - pythonGenerator.generate( - document, - test.actualOutputRoot, - true, - ), - ) + .flatMap((document) => pythonGenerator.generate(document, test.actualOutputRoot, true)) .map((textDocument) => [textDocument.uri, textDocument.getText()]) .toMap( (entry) => entry[0],