Skip to content

Commit e6493a6

Browse files
committed
Reformat codebase with updated format preset
1 parent bf56691 commit e6493a6

6 files changed

Lines changed: 27 additions & 21 deletions

File tree

finecode_extension_runner/src/finecode_extension_runner/global_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
# the runner, not from updating the config
99
project_dir_path: Path | None = None
1010
log_level: Literal["TRACE", "INFO"] = "INFO"
11-
env_name: str = ""
11+
env_name: str = ""

finecode_extension_runner/src/finecode_extension_runner/lsp_server.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,13 @@ async def get_project_raw_config(
165165
return json.loads(raw_config.config)
166166

167167

168-
async def update_config(ls: lsp_server.LanguageServer, working_dir: pathlib.Path, project_name: str, config: dict[str, typing.Any]):
169-
logger.trace(f'Update config: {working_dir} {project_name} {config}')
168+
async def update_config(
169+
ls: lsp_server.LanguageServer,
170+
working_dir: pathlib.Path,
171+
project_name: str,
172+
config: dict[str, typing.Any],
173+
):
174+
logger.trace(f"Update config: {working_dir} {project_name} {config}")
170175
try:
171176
actions = config["actions"]
172177
action_handler_configs = config["action_handler_configs"]
@@ -222,7 +227,12 @@ def default(self, obj):
222227
return super().default(obj)
223228

224229

225-
async def run_action(ls: lsp_server.LanguageServer, action_name: str, params: dict[str, typing.Any], options: dict[str, typing.Any] | None):
230+
async def run_action(
231+
ls: lsp_server.LanguageServer,
232+
action_name: str,
233+
params: dict[str, typing.Any],
234+
options: dict[str, typing.Any] | None,
235+
):
226236
logger.trace(f"Run action: {action_name}")
227237
request = schemas.RunActionRequest(action_name=action_name, params=params)
228238
options_schema = schemas.RunActionOptions(**options if options is not None else {})

finecode_extension_runner/src/finecode_extension_runner/services.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@
1212
from pydantic.dataclasses import dataclass as pydantic_dataclass
1313

1414
from finecode_extension_api import code_action, textstyler
15-
from finecode_extension_runner import (
16-
context,
17-
domain,
18-
global_state,
19-
run_utils,
20-
schemas,
21-
)
15+
from finecode_extension_runner import context, domain, global_state, run_utils, schemas
2216
from finecode_extension_runner._services import run_action as run_action_module
2317
from finecode_extension_runner._services.run_action import (
2418
ActionFailedException,

src/finecode/cli_app/run.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,15 @@ async def run_actions_in_running_project(
340340
result_format=services.RunResultFormat.STRING,
341341
)
342342
except services.ActionRunFailed as exception:
343-
raise RunFailed(f"Running of action {action_name} failed: {exception.message}")
343+
raise RunFailed(
344+
f"Running of action {action_name} failed: {exception.message}"
345+
)
344346
except Exception as error:
345347
logger.error("Unexpected exception")
346348
logger.exception(error)
347-
raise RunFailed(f"Running of action {action_name} failed with unexpected exception")
349+
raise RunFailed(
350+
f"Running of action {action_name} failed with unexpected exception"
351+
)
348352

349353
run_result_str = run_result_to_str(run_result.result, action_name)
350354
result_by_action[action_name] = ActionRunResult(

src/finecode/runner/manager.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ async def stop_extension_runner(runner: runner_info.ExtensionRunnerInfo) -> None
172172
logger.debug("Sent exit to server")
173173
await runner.client.stop()
174174
logger.trace(
175-
f"Stop extension runner {runner.process_id}"
176-
f" in {runner.readable_id}"
175+
f"Stop extension runner {runner.process_id}" f" in {runner.readable_id}"
177176
)
178177
else:
179178
logger.trace("Extension runner was not running")
@@ -194,8 +193,7 @@ def stop_extension_runner_sync(runner: runner_info.ExtensionRunnerInfo) -> None:
194193
runner_client.exit_sync(runner)
195194
logger.debug("Sent exit to server")
196195
logger.trace(
197-
f"Stop extension runner {runner.process_id}"
198-
f" in {runner.readable_id}"
196+
f"Stop extension runner {runner.process_id}" f" in {runner.readable_id}"
199197
)
200198
else:
201199
logger.trace("Extension runner was not running")

src/finecode/runner/runner_info.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ def process_id(self) -> int:
8181
return self.client._server.pid
8282
else:
8383
return 0
84-
84+
8585
@property
8686
def readable_id(self) -> str:
87-
return f'{self.working_dir_path} ({self.env_name})'
88-
87+
return f"{self.working_dir_path} ({self.env_name})"
88+
8989
@property
9090
def logs_path(self) -> Path:
91-
return self.working_dir_path / '.venvs' / self.env_name / 'logs' / 'runner.log'
91+
return self.working_dir_path / ".venvs" / self.env_name / "logs" / "runner.log"
9292

9393

9494
class RunnerStatus(enum.Enum):

0 commit comments

Comments
 (0)