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

[Refactor] Use walrus operator in study.py (Python 3.10+ upgrade)

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

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

評価

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

調査の方向性

content の代入、None のチェック、および古くなった walrus に関する TODO コメントがある、151 行目と 162 行目の周辺の openml/study/study.py を開いてください。各代入とチェックを walrus operator と組み合わせ、解決済みの TODO コメントを削除し、Python 3.10+ 要件の下でも動作が変わらないことを確認してください。

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

説明

Description

The openml-python project recently bumped its minimum Python version requirement to >=3.10 in pyproject.toml.

However, in openml/study/study.py (around lines 151 and 162), there are older developer comments stating: # TODO(eddiebergman): Begging for a walrus if we can drop 3.7.

Since Python 3.7 has indeed been dropped, we can now safely use the walrus operator (:=) to refactor these variable assignments, which cleans up the code and reduces lines.

Expected behavior

The lines assigning content from getattr and checking if content is not None should be combined into a single line using :=. No logical behavior should change; this is purely a code quality refactor to utilize modern Python syntax and resolve the outstanding TODO comments.

主要言語
Python
スター
361
フォーク
296
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

openml/openml-python のほかの issue

openml/openml-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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