Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#1,746 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api

Research direction

Open openml/study/study.py around lines 151 and 162, where the content assignments, None checks, and outdated walrus TODO comments are located. Combine each assignment and check with the walrus operator, remove the resolved TODO comments, and verify that behavior remains unchanged under the Python 3.10+ requirement.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
361
Forks
296
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openml/openml-python

All issues in openml/openml-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.