Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes while adding type annotaions (#600)
* enums: Remove duplicate definition of ENUM_SUNW_SYMINFO_BOUNDTO - 5db2966 introduced it first as `ENUM_SYMINFO_BOUNDTO` - 594dc72 renamed it to `ENUM_SUNW_SYMINFO_BOUNDTO` - 7b24670 added it a 2nd time Signed-off-by: Philipp Hahn <phahn-oss@avm.de> * relocation: Remove helper functions from class A method expects `self` as the first argument; they are all functions. Normally you would mark them as `@staticmethod`, but they are all de-referenced already during class definition, at which point they are actually still functions: they only become methods after the `class` scope is finished. ```console $ test/all_tests.py E........EE...................E.....E.....E..................................................................... ====================================================================== ERROR: test_reloc (test_arm_call_reloc.TestARMRElocation) ---------------------------------------------------------------------- Traceback (most recent call last): File "…/pyelftools/test/test_arm_call_reloc.py", line 41, in test_reloc self.assertEqual(do_relocation(rel_elf), File "…/pyelftools/test/test_arm_call_reloc.py", line 28, in do_relocation rh.apply_section_relocations(stream, rel) File "…/pyelftools/elftools/elf/relocation.py", line 238, in apply_section_relocations self._do_apply_relocation(stream, reloc, symtab) File "…/pyelftools/elftools/elf/relocation.py", line 319, in _do_apply_relocation relocated_value = recipe.calc_func( TypeError: 'staticmethod' object is not callable ``` For clarity move those functions before class `RelocationHandler`. Signed-off-by: Philipp Hahn <phahn-oss@avm.de> --------- Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
- Loading branch information