pypa / pypa/distutils

Replace boolean parameter with two methods.

Open
#323 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
59
Forks
94
PR merge metrics
No merged PRs in 30d

Description

This complicated signature, caused by a boolean parameter, should probably be re-written as two methods, get_command_obj and get_cached_command_obj, where the latter just returns self.command_obj.get(command). Of course, that's not a concern for this PR.

Originally posted by @jaraco in https://github.com/pypa/distutils/pull/307#discussion_r1898011172

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the method with the boolean parameter and its callers in the distutils source; the issue does not name a file or test. Compare the existing behavior with the proposed get_command_obj and get_cached_command_obj methods, then check relevant tests and callers. Done means the boolean-based interface is replaced consistently without changing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.