Skip to content

Commit

Permalink
Annotations: annotate containers properly. Re #155.
Browse files Browse the repository at this point in the history
Annotate containers, including find text, cart edit timestamp used in cart explorer, and config profile status map.
  • Loading branch information
josephsl committed Jan 23, 2021
1 parent ca0260c commit c02a059
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions addon/appModules/splstudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# #155 (21.03): remove __future__ import when NVDA runs under Python 3.10.
from __future__ import annotations
from typing import Any
from typing import Any, Optional
from functools import wraps
import os
import time
Expand Down Expand Up @@ -1378,7 +1378,8 @@ def script_setBrailleTimer(self, gesture):
# 6.0: Split this routine into two functions, with the while loop moving to a function of its own.
# This new function will be used by track finder and place marker locator.
# 17.08: now it is a list that records search history.
findText = None
# 21.03: accept both None and str because it will be filtered to remove None anyway.
findText: Optional[list[Optional[str]]] = None

def trackFinder(self, text, obj, directionForward=True, column=None):
speech.cancelSpeech()
Expand Down
2 changes: 1 addition & 1 deletion addon/appModules/splstudio/splconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def swapProfiles(self, prevProfile, newProfile, showSwitchIndex=False):
# To be run in app module constructor.
# With the load function below, prepare config and other things upon request.
# Prompt the config error dialog only once.
_configLoadStatus = {} # Key = filename, value is pass or no pass.
_configLoadStatus: dict[str, str] = {} # Key = filename, value is pass or no pass.
# Track comments map.
trackComments = {}

Expand Down
4 changes: 3 additions & 1 deletion addon/appModules/splstudio/splmisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Miscellaneous functions and user interfaces
# Split from config module in 2015.

# #155 (21.03): remove __future__ import when NVDA runs under Python 3.10.
from __future__ import annotations
import weakref
import os
import threading
Expand Down Expand Up @@ -306,7 +308,7 @@ def _populateCarts(carts, cartlst, modifier, standardEdition=False, refresh=Fals


# Cart file timestamps.
_cartEditTimestamps = []
_cartEditTimestamps: list[float] = []


# Initialize Cart Explorer i.e. fetch carts.
Expand Down

0 comments on commit c02a059

Please sign in to comment.