Skip to content

Commit 78d8e1c

Browse files
Formatting
1 parent dbe5c81 commit 78d8e1c

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/extension/debugger/configuration/debugConfigurationService.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { IMultiStepInputFactory, InputStep, IQuickPickParameters, MultiStepInput
88
import { AttachRequestArguments, DebugConfigurationArguments, LaunchRequestArguments } from '../../types';
99
import { DebugConfigurationState, DebugConfigurationType, IDebugConfigurationService } from '../types';
1010
import { buildDjangoLaunchDebugConfiguration } from './providers/djangoLaunch';
11-
import { buildFastAPILaunchDebugConfiguration, buildFastAPIWithFileLaunchDebugConfiguration } from './providers/fastapiLaunch';
11+
import {
12+
buildFastAPILaunchDebugConfiguration,
13+
buildFastAPIWithFileLaunchDebugConfiguration,
14+
} from './providers/fastapiLaunch';
1215
import { buildFileLaunchDebugConfiguration } from './providers/fileLaunch';
1316
import { buildFlaskLaunchDebugConfiguration } from './providers/flaskLaunch';
1417
import { buildModuleLaunchConfiguration } from './providers/moduleLaunch';
@@ -183,7 +186,10 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi
183186
>();
184187
debugConfigurations.set(DebugConfigurationType.launchDjango, buildDjangoLaunchDebugConfiguration);
185188
debugConfigurations.set(DebugConfigurationType.launchFastAPI, buildFastAPILaunchDebugConfiguration);
186-
debugConfigurations.set(DebugConfigurationType.launchFastAPIWithFile, buildFastAPIWithFileLaunchDebugConfiguration);
189+
debugConfigurations.set(
190+
DebugConfigurationType.launchFastAPIWithFile,
191+
buildFastAPIWithFileLaunchDebugConfiguration,
192+
);
187193
debugConfigurations.set(DebugConfigurationType.launchFile, buildFileLaunchDebugConfiguration);
188194
debugConfigurations.set(DebugConfigurationType.launchFileWithArgs, buildFileWithArgsLaunchDebugConfiguration);
189195
debugConfigurations.set(DebugConfigurationType.launchFlask, buildFlaskLaunchDebugConfiguration);

src/extension/debugger/configuration/providers/fastapiLaunch.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ async function promptForAppPath(
2222
prompt: DebugConfigStrings.fastapi.enterAppPath.prompt,
2323
value: value ?? '',
2424
validate: (v) =>
25-
Promise.resolve(
26-
v && v.trim().length > 0 ? undefined : DebugConfigStrings.fastapi.enterAppPath.invalid,
27-
),
25+
Promise.resolve(v && v.trim().length > 0 ? undefined : DebugConfigStrings.fastapi.enterAppPath.invalid),
2826
});
2927
return entered?.trim();
3028
}
@@ -42,9 +40,7 @@ export async function buildFastAPILaunchDebugConfiguration(
4240
} else {
4341
const workspaceRoot = state.folder?.uri.fsPath;
4442
const prefill =
45-
workspaceRoot && fastApiPaths.length > 0
46-
? path.relative(workspaceRoot, fastApiPaths[0].fsPath)
47-
: undefined;
43+
workspaceRoot && fastApiPaths.length > 0 ? path.relative(workspaceRoot, fastApiPaths[0].fsPath) : undefined;
4844
const entered = await promptForAppPath(input, prefill);
4945
if (!entered) {
5046
return;

0 commit comments

Comments
 (0)