Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

build_parameters checks the parameter tree root instead of the parameter

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

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

バグはPolicyEngineCountry.build_parameters(policyengine_api/country.py内)にあります。最後のelifが、現在のparameterではなくルートに対してisinstance(parameters, ParameterNode)を判定しています。その関数の型による分岐を読んでループ変数名を確認し、条件がparameterを判定するように変更してください。分岐が子孫ノードを判定し、build_parametersの既存テストがすべて通れば完了です。

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

説明

In PolicyEngineCountry.build_parameters (policyengine_api/country.py), the last branch of the type dispatch is:

elif isinstance(parameters, ParameterNode):

parameters is the root tax_benefit_system.parameters, which is always a ParameterNode, so the condition is always true. The intended check is almost certainly isinstance(parameter, ParameterNode) on the current descendant.

Impact

None observed today: every descendant that reaches this branch is a ParameterNode anyway, so the output is the same. But any other descendant type would silently be described as a parameter node instead of being skipped.

Expected

Check parameter, not parameters.

Notes

Found while documenting the code for the ruff docstring rules; behaviour was left unchanged there.

主要言語
Python
スター
18
フォーク
33
平均マージ
1日 15時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

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

PolicyEngine/policyengine-api のほかの issue

PolicyEngine/policyengine-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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