Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added an @script decorator to scriptHandler for setting script metada…
…ta (#8236) * added an @script decorator for setting script metadata to the scriptHandler module added a metaclass for collecting gestures on ScriptableObjects, this now supports getting from .gesture and .gestures set on script_ functions by the @script decorator. Fixes #6266 * Removed gesture attribute from script functions Now passing gesture to the ```@script``` decorator will append the gesture to the list of gestures, rather than setting both gesture and gestures attributes on the function. * Removed unused getScripts method from BaseObject * Address review comment and rename GestureCollector to ScriptableType * Make the script decorator gestures work both for normal and dynamic NVDAObjects. Provide a working example for Excel * First baceObject tests * Fix decorated scripts not properly being added when subclassing objects * Finish unit tests * Add bypasInputHelp and resumeSayAllMode to the script decorator * Review actions * Add unit tests for the script decorator itself * Update developer guide * Review actions * Review actions regarding devGuide and comments * Only use the per class __gestures dictionary, also for decorated scripts * Last review action * Revert NVDAObjects/__init__.py to master, as in the end, this hasn't been touched by this change * Also revert changes to test suite objectProvider * Split of lines in devGuide * Rename the scripts in test_baseObject to follow the phonetic alphabet, to fix a bug in baseObject that used only the first character of a script name. * Log warnings when using the script decorator in a wrong way, either by decorating a non method or a method which name doesn't start with script_
- Loading branch information
1 parent
f996ee4
commit 9d35a2f
Showing
6 changed files
with
331 additions
and
62 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
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
Oops, something went wrong.