Skip to content
Open
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
4 changes: 2 additions & 2 deletions generators/python/src/fern_python/cli/abstract_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions generators/python/src/fern_python/cli/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
Loading