Refactor repeated code into reusable functions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Here is an example of one such code:
https://github.com/LMCache/LMBench/blob/9318e41fa9898d57c36f52f2ca95d6980df9704c/run-bench.py#L222-L238
and
https://github.com/LMCache/LMBench/blob/9318e41fa9898d57c36f52f2ca95d6980df9704c/run-bench.py#L279-L295
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open run-bench.py and compare the repeated blocks at lines 222-238 and 279-295. Identify the shared behavior that can be represented by one reusable function, then confirm both locations use it without changing their existing benchmark behavior. Done means the duplicated code is replaced by the shared function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100