Skip to content

Commit

Permalink
fix: skip pyproject.toml unless it contains tool.poetry (#6316)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Dec 18, 2023
1 parent 667fde1 commit 1eedf4c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ protected void analyzeDependency(Dependency dependency, Engine engine) throws An
}

final Toml result = new Toml().read(dependency.getActualFile());
if (PYPROJECT_TOML.equals(dependency.getActualFile().getName()) && result.getTables("tool.poetry") == null) {
LOGGER.debug("skipping {} as it does not contain `tool.poetry`", dependency.getDisplayFileName());
return;
}
final List<Toml> projectsLocks = result.getTables("package");
if (projectsLocks == null) {
return;
Expand Down

0 comments on commit 1eedf4c

Please sign in to comment.