Bug: `setup.cfg` `install_requires` on the same line as the key is not read

オープン 初心者向け
#707 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, typescript
領域
cli, devtools

調査の方向性

src/core-open/scanners/python-scanner.ts の parseSetupCfg から始め、install_requires がどのように照合され、各エントリが parseRequirementLine に渡されるかを確認してください。既存のテストの隣に Python マニフェストのテストを追加するか拡張し、同じ行にある形式、継続行の形式、改行後にインデントする形式を確認するとともに、python_requires が変わらないことを確かめてください。列挙されたすべてのパッケージが報告され、既存の形式も引き続き通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug good first issue
  • Difficulty: small
  • Area: Python scanner
Problem

parseSetupCfg in src/core-open/scanners/python-scanner.ts (around line 1148) only matches a multiline indented list:

const installReqMatch = optionsSection[1]!.match(/install_requires\s*=\s*\n((?:\s+.*\n?)*)/);

The regex requires a newline after =. These common forms are dropped:

[options]
install_requires = requests>=2.31, flask>=3.0
[options]
install_requires = requests>=2.31
    flask>=3.0

The already-supported form (value starts on the next line, one requirement per indented line) must keep working.

Expected behaviour

install_requires accepts a same-line list (comma-separated or a single requirement), a list that starts on the same line and continues with indented lines, and the current newline-then-indent form. Each entry is parsed with the existing parseRequirementLine helper.

Acceptance
  • Tests live next to other Python manifest tests (for example a new test/python-setup-cfg.test.ts, or cases in test/python-runtime-pin.test.ts).
  • install_requires = requests>=2.31 on one line reports requests.
  • A comma-separated same-line list reports every package.
  • A value that starts on the same line and continues with indented lines reports every package.
  • The current indented-only form still works.
  • python_requires on the same [options] section is unchanged.

主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。