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

wxGUI: Fixed star imports in wxdisplay.py #4974

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

arohanajit
Copy link
Contributor

Fixed F405 in wxdisplay.py by specifying imports

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Jan 22, 2025
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

UNCHECKED and String can't be imported from ctypes and please make sure the CI checks are ok

@echoix
Copy link
Member

echoix commented Jan 23, 2025

UNCHECKED and String can't be imported from ctypes and please make sure the CI checks are ok

How did you find it/check it? (To find a way to have it pointed to us, with a tool or something, I didn't catch it myself). Otherwise, how does one come up with a non-existing import in a PR?

@arohanajit
Copy link
Contributor Author

UNCHECKED and String can't be imported from ctypes and please make sure the CI checks are ok

I have recategorised them. As for CI, its failing because CI for this flake8 is dependant upon #4973 . I think post merge of that PR, CI here should fix itself

@petrasovaa
Copy link
Contributor

UNCHECKED and String can't be imported from ctypes and please make sure the CI checks are ok

How did you find it/check it? (To find a way to have it pointed to us, with a tool or something, I didn't catch it myself). Otherwise, how does one come up with a non-existing import in a PR?

You can simply just run it, ctypes is part of Python library:

from ctypes import ...

I remembered it from previous PRs, see how the import was done in wxnviz.py:

from grass.lib.ctypes_preamble import UNCHECKED, String

you can always go to the compiled files (dist.x86_64-pc-linux-gnu/etc/python/grass/lib/..) to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants