+
Skip to content

Conversation

keshav-space
Copy link
Member

@keshav-space keshav-space force-pushed the 1509-pypa-importer-pipeline branch 3 times, most recently from 1364361 to 567f1ec Compare August 26, 2024 16:01
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank. Some nits for your consideration!


def advisories_count(self):
vulns_path = Path(self.vcs_response.dest_dir) / "vulns"
return sum(1 for _ in vulns_path.rglob("*.yaml"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this too? or is this to avoid using too much memory?

Suggested change
return sum(1 for _ in vulns_path.rglob("*.yaml"))
return len(list(vulns_path.rglob("*.yaml")))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, did that to avoid keeping all the Path objects in memory at the same time.

Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
@keshav-space keshav-space force-pushed the 1509-pypa-importer-pipeline branch from 567f1ec to d73cfd4 Compare August 26, 2024 19:53
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@keshav-space keshav-space merged commit 5b982c6 into main Aug 27, 2024
@keshav-space keshav-space deleted the 1509-pypa-importer-pipeline branch August 27, 2024 05:59
@keshav-space keshav-space self-assigned this Sep 2, 2024
@pombredanne pombredanne added 1-next and removed 9-next labels Sep 24, 2024
@keshav-space keshav-space linked an issue Mar 28, 2025 that may be closed by this pull request
@pombredanne pombredanne moved this to Validated in 00-AboutCodePlanner Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project
Status: Validated

Development

Successfully merging this pull request may close these issues.

VCIO-next: Design new Improver

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载