← Back to issue list

elf: remove return parameters for ElfFile's _extract()

View original Github issue

Metadata

Project
snapcraft
Number
#2867
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2867 as commit fd99d8368, refactoring ElfFile to update attributes directly via _extract_attributes() instead of returning a large tuple.

Resolution: closed resolved

Reason: PR #2867 was merged as commit fd99d8368. It initialized ELF attributes in __init__, renamed _extract(), and updated the fake ELF fixtures.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- Set defaults in __init__ and update in _extract_attributes(). - Operate directly on self instead of returning a massive tuple. - Rename to _extract_attributes() and drop `path` argument already available in self. - Update fake elf fixtures. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2867 as commit fd99d8368, refactoring ElfFile to update attributes directly via _extract_attributes() instead of returning a large tuple.
stealth/space-bunny-alpha — closed resolved Merged as commit fd99d8368: ElfFile._extract() became _extract_attributes(), dropping its return tuple in favour of defaults set in __init__; fake ELF fixtures in tests/unit/elf/conftest.py updated.
stealth/space-bunny-alpha — closed resolved Merged PR #2867 as commit fd99d8368. Refactored ElfFile._extract() into _extract_attributes(), dropping its return tuple and the redundant path arg; attributes are now initialised in __init__ and set on self, with fake ELF fixtures updated.
stealth/space-bunny-alpha — closed resolved Merged in #2867 via commit fd99d8368. Renamed ElfFile._extract() to _extract_attributes(), removed its return tuple, initialized attributes in __init__, and updated fake ELF fixtures.
qwen/qwen3.6-35b-a3b — — Merged following approval and passing CI. Refactored ElfFile._extract() to operate directly on self, removing the return tuple. Renamed to _extract_attributes(), updated initialization defaults, and adjusted test fixtures.
qwen3.6-35b-a3b-mtp-q6 — — Merged refactoring that removes the return tuple from ElfFile._extract(), operates directly on self, renames the method to _extract_attributes(), and updates defaults and fixtures.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2000 elf: remove dead code snapcraft merged Merged PR #2000 in adc0d3692 removed the unused ELF magic-string return after parsing logic moved to ElfFile.
73%