Skip to content

Alternate try to fix aer lint failure by installing aer #980

Merged
chriseclectic merged 1 commit into
Qiskit:masterfrom
chriseclectic:fix-pylint
Oct 8, 2020
Merged

Alternate try to fix aer lint failure by installing aer #980
chriseclectic merged 1 commit into
Qiskit:masterfrom
chriseclectic:fix-pylint

Conversation

@chriseclectic
Copy link
Copy Markdown
Member

Summary

Qiskit/qiskit#5086 seemd to break pylint testing by preventing the Aer package from being found by pylint without building and installing.

This tries to fix the issue by replacing all absolute imports in Aer with relative module imports. This is a work around until general namespace packaging issues are implemented to move all of Aer into its own namespace.

Details and comments

#979 fixes the issue by building and installing Aer in the lint module, however this means lint passing is dependent on Aer being built via sdist, which is a separate test usually run after linting.

Qiskit/qiskit#5086 seemd to break pylint testing by preventing the Aer package from being found by pylint without building and installing. This fixes the issue by replacing all absolute imports in Aer with relative module imports. This is a work around until general namespace packaging issues are implemented to move all of Aer into its own namespace.
Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

I guess this is fine, I think the bigger part of why this works is the disabling of no-name-in-module for the pybind imports from controller_wrappers. But disabling import checking on compiled extensions is pretty common practice for pylint.

@chriseclectic chriseclectic merged commit f6b6a4e into Qiskit:master Oct 8, 2020
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.

2 participants