aboutcode-org / aboutcode-org/vulnerablecode

fix: Remove unnecessary f-string prefix in vulnrichment.py

Open
#2,072 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
702
Forks
328
Avg merge
3d 8h
Merged PRs (30d)
3

Description

## Summary

The file [vulnerabilities/importers/vulnrichment.py](cci:7://file:///D:/Projects2.0/Gsoc/vulnerablecode/vulnerabilities/importers/vulnrichment.py:0:0-0:0) contains an f-string without any placeholders at line 32, which violates ruff rule F541.

## Problem

Using `f"..."` syntax without any `{variable}` placeholders inside is:
- Unnecessary overhead (f-strings are marginally slower than regular strings)
- Misleading to readers who expect interpolation
- A code quality issue flagged by linters

## Location

**File:** [vulnerabilities/importers/vulnrichment.py](cci:7://file:///D:/Projects2.0/Gsoc/vulnerablecode/vulnerabilities/importers/vulnrichment.py:0:0-0:0)
**Line:** 32
**Current code:**
```python
for file_path in base_path.glob(f"**/**/*.json"):

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.