Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyright typing error: "ELF" is not a known member of module "lief" (reportAttributeAccessIssue) #1017

Closed
adamjseitz opened this issue Jan 26, 2024 · 2 comments
Assignees
Milestone

Comments

@adamjseitz
Copy link
Contributor

Describe the bug
When type-checking Python code that imports lief.ELF, pyright generates the following error:

"ELF" is not a known member of module "lief" (reportAttributeAccessIssue)

To Reproduce

$ cat test.py
import lief

lief.ELF.parse("/usr/bin/ls")

$ pyright test.py
/home/aseitz/lief-typing-test/test.py
  /home/aseitz/lief-typing-test/test.py:3:6 - error: "ELF" is not a known member of module "lief" (reportAttributeAccessIssue)
1 error, 0 warnings, 0 informations

Expected behavior
pyright should not generate any errors.

Environment (please complete the following information):

  • System and Version : Ubuntu 20.04
  • Target format : ELF
  • LIEF commit version: 0.14.0-16962f2f

Additional context
This is a regression in 0.14.0. Pyright generates no errors for the same script with lief 0.13.2.

@genbtc
Copy link

genbtc commented Feb 6, 2024

If I had to guess I would say its this commit right here:
529d5a8#diff-52d61b00d409b2196330cc6abe8036885d26f9d2eb36d8d8f070134b5e92e302

@romainthomas
Copy link
Member

On going fix.

romainthomas added a commit that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants