Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Oct 20, 2023
1 parent e2850f6 commit ec3acca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
25 changes: 14 additions & 11 deletions src/language/builtins/safe-ds-classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,20 @@ export class SafeDsClasses extends SafeDsModuleMembers<SdsClass> {
* Returns whether the given node is a builtin class.
*/
isBuiltinClass(node: SdsClass | undefined): boolean {
return Boolean(node) && [
this.Any,
this.Boolean,
this.Float,
this.Int,
this.List,
this.Map,
this.Nothing,
this.Number,
this.String,
].includes(node);
return (
Boolean(node) &&
[
this.Any,
this.Boolean,
this.Float,
this.Int,
this.List,
this.Map,
this.Nothing,
this.Number,
this.String,
].includes(node)
);
}

private getClass(name: string): SdsClass | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/language/safe-ds-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { SafeDsNodeMapper } from './helpers/safe-ds-node-mapper.js';
import { SafeDsAnnotations } from './builtins/safe-ds-annotations.js';
import { SafeDsClassHierarchy } from './typing/safe-ds-class-hierarchy.js';
import { SafeDsPartialEvaluator } from './partialEvaluation/safe-ds-partial-evaluator.js';
import {SafeDsSemanticTokenProvider} from "./lsp/safe-ds-semantic-token-provider.js";
import { SafeDsSemanticTokenProvider } from './lsp/safe-ds-semantic-token-provider.js';

/**
* Declaration of custom services - add your own service classes here.
Expand Down
2 changes: 1 addition & 1 deletion src/language/validation/other/declarations/segments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SdsSegment } from '../../../generated/ast.js';
import { ValidationAcceptor } from 'langium';
import { parametersOrEmpty, resultsOrEmpty } from '../../../helpers/nodeProperties.js';
import { SafeDsServices } from '../../../safe-ds-module.js';
import {DiagnosticTag} from "vscode-languageserver-types";
import { DiagnosticTag } from 'vscode-languageserver-types';

export const CODE_SEGMENT_DUPLICATE_YIELD = 'segment/duplicate-yield';
export const CODE_SEGMENT_UNASSIGNED_RESULT = 'segment/unassigned-result';
Expand Down
4 changes: 2 additions & 2 deletions tests/language/lsp/safe-ds-semantic-token-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('SafeDsSemanticTokenProvider', async () => {
expectedTokenTypes: [SemanticTokenTypes.class],
},
{
testName: "named type",
testName: 'named type',
code: `
enum E {}
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('SafeDsSemanticTokenProvider', async () => {
}
`,
expectedTokenTypes: [SemanticTokenTypes.typeParameter],
}
},
])('should assign the correct token types ($testName)', async ({ code, expectedTokenTypes }) => {
await checkSemanticTokens(code, expectedTokenTypes);
});
Expand Down

0 comments on commit ec3acca

Please sign in to comment.