aboutcode-org / aboutcode-org/vulnerablecode

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

未关闭
#2,072 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
702
派生
328
平均合并
3 天 8 小时
30 天内合并 PR
3

描述

## 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"):

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。