async def fmt(wrapped_target: IsortTarget, isort_setup: IsortSetup) -> FmtResult: if isort_setup.skip: return FmtResult.noop() args = IsortArgs.create(wrapped_target=wrapped_target, isort_setup=isort_setup, check_only=False) request = await Get[ExecuteProcessRequest](IsortArgs, args) result = await Get[ExecuteProcessResult](ExecuteProcessRequest, request) return FmtResult.from_execute_process_result(result)
async def fmt(wrapped_target: BlackTarget, black_setup: BlackSetup) -> FmtResult: if black_setup.skip: return FmtResult.noop() args = BlackArgs.create(black_setup=black_setup, wrapped_target=wrapped_target, check_only=False) request = await Get[ExecuteProcessRequest](BlackArgs, args) result = await Get[ExecuteProcessResult](ExecuteProcessRequest, request) return FmtResult.from_execute_process_result(result)
async def black_fmt(formatter: BlackFormatter, black: Black) -> FmtResult: if black.options.skip: return FmtResult.noop() setup = await Get[Setup](SetupRequest(formatter, check_only=False)) result = await Get[ExecuteProcessResult](ExecuteProcessRequest, setup.process_request) return FmtResult.from_execute_process_result(result)