Skip to content

Execution Environments #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions extensions/fine_python_flake8/fine_python_flake8/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import argparse
import ast
import dataclasses
import operator
from pathlib import Path

Expand Down Expand Up @@ -106,6 +107,7 @@ def run_flake8_on_single_file(
return lint_messages


@dataclasses.dataclass
class Flake8LintHandlerConfig(code_action.ActionHandlerConfig):
max_line_length: int = 79
extend_select: list[str] | None = None
Expand Down
6 changes: 4 additions & 2 deletions extensions/fine_python_mypy/fine_python_mypy/action.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TODO: what to do with file manager? Mypy would need ability to check module text,
# not only module file
import asyncio
import dataclasses
import hashlib
import sys
from pathlib import Path
Expand All @@ -20,6 +21,7 @@
class DmypyFailedError(Exception): ...


@dataclasses.dataclass
class MypyManyCodeActionConfig(code_action.ActionHandlerConfig): ...


Expand Down Expand Up @@ -239,7 +241,7 @@ async def _run_dmypy(self, file_paths: list[Path], cwd: Path) -> str:
self.logger.debug(f"run dmypy in {cwd}")
status_file_path = self._get_status_file_path(dmypy_cwd=cwd)
runner_python_executable = sys.executable
file_paths_str = " ".join([f"'{str(file_path)}'" for file_path in file_paths])
file_paths_strs = [str(file_path) for file_path in file_paths]
cmd_parts = [
f"{runner_python_executable}",
"-m",
Expand All @@ -248,7 +250,7 @@ async def _run_dmypy(self, file_paths: list[Path], cwd: Path) -> str:
"run",
"--",
*self.DMYPY_ARGS,
f"{file_paths_str}",
*file_paths_strs
]
cmd = " ".join(cmd_parts)
dmypy_run_process = await self.command_runner.run(
Expand Down
1 change: 0 additions & 1 deletion finecode.sh

This file was deleted.

Loading
Loading