Package org.openrewrite.python.internal
Class UvLockParser
java.lang.Object
org.openrewrite.python.internal.UvLockParser
Parses uv.lock files (TOML format) to extract resolved dependency information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAndParse(Path pyprojectDir, @Nullable Path boundary) Find and parse a uv.lock file, walking up from the given directory.static booleanhasAlternativeLockFile(Path startDir, @Nullable Path boundary) Check whether a poetry.lock or pdm.lock file exists near the given directory.Parse uv.lock content into a list of resolved dependencies.
-
Constructor Details
-
UvLockParser
public UvLockParser()
-
-
Method Details
-
findAndParse
public static List<PythonResolutionResult.ResolvedDependency> findAndParse(Path pyprojectDir, @Nullable Path boundary) Find and parse a uv.lock file, walking up from the given directory.- Parameters:
pyprojectDir- the directory containing pyproject.tomlboundary- the boundary to stop searching at (typically relativeTo)- Returns:
- list of resolved dependencies, or empty list if no uv.lock found
-
hasAlternativeLockFile
Check whether a poetry.lock or pdm.lock file exists near the given directory. -
parse
Parse uv.lock content into a list of resolved dependencies.
-