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

Script decorator: add ability to specify that given script should be active in sleep mode. #11979



Copy link

Link to issue number:

None - discovered by @josephsl during his work on #11974

Summary of the issue:

It is impossible to specify that given script should be active in sleep mode for a script decorated with script decorator.

Description of how this pull request fixes the issue:

Script decorator now accepts additional parameter allowInSleepMode which just sets it on the script.
While at it I've also added type hints to the list of its arguments and extended unit test to ensure that allowInSleepMode works.

Testing performed:

I've decorated script which enables/disables sleep mode for a current app and set allowInSlepMode to true ensuring that this script indeed works when in sleep mode. This code isn't in the PR as IMHO it makes sense to merge tis PR first and then perform the actual change as part of #11974.

Known issues with pull request:

None known

Change log entry:

Changes for developers:

  • It is now possible to make given script work in sleep mode when using script decorator by specifying allowInSleeepMode in the list of script decorator's

josephsl previously approved these changes Dec 31, 2020
Copy link

@josephsl josephsl left a comment

Choose a reason for hiding this comment

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

Thanks. Blocks PR #11974

@michaelDCurran michaelDCurran merged commit 8ec984e into nvaccess:master Jan 11, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Jan 11, 2021
@lukaszgo1 lukaszgo1 deleted the scriptDecoratorAllowInSleepMode branch January 11, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants