diff --git a/generators/python/src/fern_python/cli/abstract_generator.py b/generators/python/src/fern_python/cli/abstract_generator.py index 4b0f0fc4848..11dae9c0e61 100644 --- a/generators/python/src/fern_python/cli/abstract_generator.py +++ b/generators/python/src/fern_python/cli/abstract_generator.py @@ -184,11 +184,11 @@ def generate_project( publisher.run_ruff_check_fix("/fern/output", cwd="/") publisher.run_ruff_format("/fern/output", cwd="/") elif output_mode_union.type == "github": - publisher.run_poetry_install() + publisher.run_poetry_lock() publisher.run_ruff_check_fix() publisher.run_ruff_format() elif output_mode_union.type == "publish": - publisher.run_poetry_install() + publisher.run_poetry_lock() publisher.run_ruff_check_fix() publisher.run_ruff_format() publisher.publish_package(publish_config=output_mode_union) diff --git a/generators/python/src/fern_python/cli/publisher.py b/generators/python/src/fern_python/cli/publisher.py index 3d3051b270b..019906a4f37 100644 --- a/generators/python/src/fern_python/cli/publisher.py +++ b/generators/python/src/fern_python/cli/publisher.py @@ -25,7 +25,7 @@ def __init__( def run_ruff_check_fix(self, path: Optional[str] = None, *, cwd: Optional[str] = None) -> None: if self._should_fix: - command = ["poetry", "run", "ruff", "check", "--fix", "--no-cache", "--ignore", "E741"] + command = ["ruff", "check", "--fix", "--no-cache", "--ignore", "E741"] if path is not None: command.append(path) self._run_command( @@ -36,7 +36,7 @@ def run_ruff_check_fix(self, path: Optional[str] = None, *, cwd: Optional[str] = def run_ruff_format(self, path: Optional[str] = None, *, cwd: Optional[str] = None) -> None: if self._should_format: - command = ["poetry", "run", "ruff", "format", "--no-cache"] + command = ["ruff", "format", "--no-cache"] if path is not None: command.append(path) self._run_command( @@ -45,10 +45,10 @@ def run_ruff_format(self, path: Optional[str] = None, *, cwd: Optional[str] = No cwd=cwd, ) - def run_poetry_install(self) -> None: + def run_poetry_lock(self) -> None: self._run_command( - command=["poetry", "install"], - safe_command="poetry install", + command=["poetry", "lock"], + safe_command="poetry lock", ) def publish_package(