tern-tools / tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
BSD 2-Clause "Simplified" License
960 stars 188 forks source link

Fix pylint unnecessary-list-index-lookup #1172

Closed rnjudge closed 2 years ago

rnjudge commented 2 years ago

Prospector 1.7.7 pulls in a newer pylint which give an unnecessary-list-index-lookup error for new PRs. This commit fixes the issue by accessing the value directly when iterating over an enumeration instead of accessing the value by index lookup.

Signed-off-by: Rose Judge rjudge@vmware.com