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 21, 2023
1 parent 36a6ae6 commit a788df4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/language/typing/safe-ds-type-computer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ import {
isSdsResult,
isSdsSegment,
isSdsTemplateString,
isSdsType, isSdsTypeArgument,
isSdsType,
isSdsTypeArgument,
isSdsTypeProjection,
isSdsUnionType,
isSdsYield,
Expand Down Expand Up @@ -142,7 +143,7 @@ export class SafeDsTypeComputer {
return this.computeTypeOfType(node);
} else if (isSdsTypeArgument(node)) {
return this.computeType(node.value);
}else if (isSdsTypeProjection(node)) {
} else if (isSdsTypeProjection(node)) {
return this.computeTypeOfType(node.type);
} /* c8 ignore start */ else {
return UnknownType;
Expand Down
2 changes: 1 addition & 1 deletion src/language/validation/other/types/unionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const unionTypeShouldNotHaveDuplicateTypes = (services: SafeDsServices) =

for (const typeArgument of typeArguments) {
const type = typeComputer.computeType(typeArgument);
if (knownTypes.some(it => it.equals(type))) {
if (knownTypes.some((it) => it.equals(type))) {
accept('warning', `The type '${type.toString()}' was already listed.`, {
node: typeArgument,
code: CODE_UNION_TYPE_DUPLICATE_TYPE,
Expand Down
8 changes: 3 additions & 5 deletions src/language/validation/safe-ds-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ import {
import { moduleDeclarationsMustMatchFileKind, moduleWithDeclarationsMustStatePackage } from './other/modules.js';
import { typeParameterConstraintLeftOperandMustBeOwnTypeParameter } from './other/declarations/typeParameterConstraints.js';
import { parameterListMustNotHaveRequiredParametersAfterOptionalParameters } from './other/declarations/parameterLists.js';
import {
unionTypeMustHaveTypes,
unionTypeShouldNotHaveDuplicateTypes
} from './other/types/unionTypes.js';
import { unionTypeMustHaveTypes, unionTypeShouldNotHaveDuplicateTypes } from './other/types/unionTypes.js';
import {
callableTypeMustNotHaveOptionalParameters,
callableTypeParameterMustNotHaveConstModifier,
Expand Down Expand Up @@ -126,7 +123,8 @@ import { callArgumentsMustBeConstantIfParameterIsConstant } from './other/expres
import {
literalTypeMustHaveLiterals,
literalTypeMustNotContainListLiteral,
literalTypeMustNotContainMapLiteral, literalTypeShouldNotHaveDuplicateLiteral,
literalTypeMustNotContainMapLiteral,
literalTypeShouldNotHaveDuplicateLiteral,
} from './other/types/literalTypes.js';

/**
Expand Down

0 comments on commit a788df4

Please sign in to comment.