Skip to content

Remove all import *#2468

Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom
Jaime02:fix-imports
Oct 6, 2022
Merged

Remove all import *#2468
j9ac9k merged 2 commits intopyqtgraph:masterfrom
Jaime02:fix-imports

Conversation

@Jaime02
Copy link
Copy Markdown
Contributor

@Jaime02 Jaime02 commented Oct 5, 2022

I have removed all the import * code, this makes all imports implicit.

I have removed all the import * code, this makes all imports implicit.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 5, 2022

Hi @Jaime02

Thanks for the PR. The openGL related changes may need to be undone, those imports were very sensitive (hence the #noqa next to them).

@Jaime02
Copy link
Copy Markdown
Contributor Author

Jaime02 commented Oct 5, 2022

@j9ac9k why? Is there a specific reason for importing all OpenGL stuff?

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 5, 2022

@j9ac9k why? Is there a specific reason for importing all OpenGL stuff?

Hi @Jaime02

The import order is important here as some of the opengl functions/objects are intended to get clobbered/overwritten through the import sequence. I learned this the hard way when I ran isort through the codebase and ran into a whole array of issues.

With the change you have proposed, the next time isort is run, all the opengl code will not work.

While other maintainers may feel differently, I'm of the opinion that any import statement with #noqa should be left as they currently are.

Go back to from `OpenGL.GL import *` imports
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 6, 2022

thanks @Jaime02 this LGTM, merging!

@j9ac9k j9ac9k merged commit 2320ac6 into pyqtgraph:master Oct 6, 2022
@Jaime02 Jaime02 deleted the fix-imports branch October 6, 2022 10:03
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