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

Pylint compatibility #11

Open
nbaju1 opened this issue May 28, 2024 · 1 comment
Open

Pylint compatibility #11

nbaju1 opened this issue May 28, 2024 · 1 comment

Comments

@nbaju1
Copy link

nbaju1 commented May 28, 2024

Cool package!

Is there a way to make this compatible with linters like Pylint? From Pylint No name 'parse' in module 'quick_xmltodict'. I'm guessing this is due to the package being Rust backed?

@danhje
Copy link
Member

danhje commented Jun 1, 2024

Hi @nbaju1, thanks for the interest in the package.

I think the error stems from the fact that Pylint doesn't load C extensions by default, for security reasons. I tried running Pylint with --extension-pkg-allow-list=quick_xmltodict, and the error disappeared. If you don't want to have to pass this argument every time, you can apparently allow all C extensions through a config file. You could of course also just mute that specific error if you don't want the whole C extension to be analyzed. You can read more about those three options here (I don't know why those tips aren't also found on the help page for the no-name-in-module error you're getting).

Let me know if this doesn't work for you and you think there's something I can do that I've overlooked, that will make Pylint happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants