-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
checks: Fix E402 Flake8 in for wxGUI Sphinx doc #4391
Conversation
What I see here is that the check for gisbase was made probably to prevent loading grass.script core if not set. However, if it were that important, it would've been a pattern we see everywhere. Does @wenzeslaus know if we are more robust now and the import can be done and the check after? If so, that PR is fine to merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be that this code was never doing anything useful. Adding etc/python/grass to sys.path does not make grass.script importable which is clearly the intention here (an import after a sys.path.append call).
You can just remove the whole block with GISBASE. Who wants to compile the documentation, needs to have grass on path - that's not such an unexpected requirement at this point. GISBASE may not even be needed on the other hand.
If I'm not mistaken, we don't compile wxGUI doc anywhere on servers, so this should be very safe to mess with.
Got it, I'll remove that code block. I'll also remove |
I fixed the merge conflict |
Fixed
E402
error ingui/wxpython/docs/wxgui_sphinx
- moved import module to the top