Bug: single-quoted strings in `pyproject.toml` are ignored
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python, typescript
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Bắt đầu tại src/core-open/scanners/python-scanner.ts, đọc parsePyprojectToml, appendPoetryDependencyTable và helper collectQuotedStrings hiện có để xem scanner xử lý cả hai kiểu dấu nháy như thế nào. Thêm các trường hợp hồi quy bên cạnh các bài kiểm thử Python runtime và Poetry, bao gồm dấu nháy hỗn hợp và cả hai dạng Poetry. Công việc hoàn tất khi các trường hợp nghiệm thu đạt yêu cầu và hành vi hiện có với dấu nháy kép vẫn không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- Difficulty: small (a few hours)
- Area: Python scanner
Problem
parsePyprojectToml in src/core-open/scanners/python-scanner.ts only accepts double-quoted TOML strings for the project name, requires-python, and [project] dependencies:
# around lines 1032–1040
const nameMatch = content.match(/^\s*name\s*=\s*"([^"]+)"/m);
const pyVerMatch = content.match(/^\s*requires-python\s*=\s*"([^"]+)"/m);
# dependencies array: const lineRegex = /"([^"]+)"/g;
Poetry tables have the same limit (appendPoetryDependencyTable, around line 989): name = "version" and { version = "..." } match only "...".
Single quotes are valid TOML. A project written like this reports no runtime and no dependencies:
[project]
name = 'demo'
requires-python = '>=3.11'
dependencies = [
'requests>=2.31',
"flask>=3.0",
]
[project.optional-dependencies] and [dependency-groups] already go through collectQuotedStrings, which accepts both quote styles. Pipfile [requires] was fixed the same way. The [project] block and Poetry tables were not.
Expected behaviour
Single-quoted, double-quoted, and triple-quoted strings are read the same way in [project] and in Poetry dependency tables. A mixed array ('requests>=2.31' next to "flask>=3.0") keeps both packages. Existing double-quoted fixtures stay unchanged.
Acceptance
- Add tests next to the existing Python / Poetry cases (for example
test/python-runtime-pin.test.tsand the Poetry / optional-deps tests). requires-python = '>=3.11'reports Python 3.11 as the runtime.- A
[project] dependenciesarray of only single-quoted requirement strings exports those packages fromvg scan. - A mixed-quote array keeps every entry.
- Poetry
requests = '2.31.0'andrequests = { version = '2.31.0' }are read. - Double-quoted forms, and a project with no
requires-python, behave as they do today.
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 3
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 76
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của vibgrate/cli
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
documentation Entwickler
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 89/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:frontend bug ci-test level:low priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
skytuhua-org/Gen-V1#2974 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area: cli area: core priority: P3 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
appandflow/stim#6736 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
naomiaro/waveform-playlist#973 ·
Maintainer thường phản hồi trong vòng 1 ngày