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

Disable pylint c-extension-no-member warning #1140

Merged
merged 1 commit into from
May 4, 2022

Conversation

housengw
Copy link
Contributor

@housengw housengw commented May 4, 2022

After the API changes in the python target in #1116, the time API in the python target became lf.time.<function_name>.

Since lf is a c extension of python, pylint does not have python source code to reference the content of lf and complains about Module 'lf' has no 'time' member.

A temporary fix is to disable c-extension-no-member warnings globally in the generated .py file.

@housengw housengw changed the title Disable pylint c-extension-no-member warning Disable pylint c-extension-no-member warning May 4, 2022
@lhstrh
Copy link
Member

lhstrh commented May 4, 2022

Seems reasonable as a stop-gap measure, but what would be a permanent look like?

Copy link
Collaborator

@petervdonovan petervdonovan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me -- thank you! Later I may try to re-enable this feature.

@housengw
Copy link
Contributor Author

housengw commented May 4, 2022

A permanent solution would involve making the time module of reactor-c a standalone library (ex. lftime) and passing --extension-pkg-whitelist=lftime as part of the argument to pylint.

@housengw housengw merged commit 194cc78 into master May 4, 2022
@housengw housengw deleted the disable-pylint-no-member branch May 7, 2022 19:34
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

Successfully merging this pull request may close these issues.

3 participants