-
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grass.pygrass: Lazy load list of commands for module shortcuts (#3688)
Importing _grass.pygrass.modules_ required the list to be loaded because the _shortcuts_ module is loaded by the _modules_ module. Now the list is loaded only when the _dir_ function is called for the first time. This is using the technique from grass init file for lazy loading translations. This allows grass.pygrass.modules to be imported without an active session, so this simplifies the GridModule tests (and its imports in general).
- Loading branch information
1 parent
55b2a2b
commit b0a00b4
Showing
2 changed files
with
18 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters