Skip to content

Commit 6bc06f1

Browse files
authored
Merge pull request #1196 from codeflash-ai/codeflash/optimize-pr1195-2026-01-29T17.08.06
⚡️ Speed up function `determine_dependency_manager` by 15% in PR #1195 (`liniting_issues`)
2 parents e145910 + 1e34a3d commit 6bc06f1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

codeflash/cli_cmds/cmd_init.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,10 @@ def install_github_actions(override_formatter_check: bool = False) -> None:
10911091

10921092
def determine_dependency_manager(pyproject_data: dict[str, Any]) -> DependencyManager:
10931093
"""Determine which dependency manager is being used based on pyproject.toml contents."""
1094-
if (Path.cwd() / "poetry.lock").exists():
1094+
cwd = Path.cwd()
1095+
if (cwd / "poetry.lock").exists():
10951096
return DependencyManager.POETRY
1096-
if (Path.cwd() / "uv.lock").exists():
1097+
if (cwd / "uv.lock").exists():
10971098
return DependencyManager.UV
10981099
if "tool" not in pyproject_data:
10991100
return DependencyManager.PIP

0 commit comments

Comments
 (0)