@@ -202,13 +202,13 @@ class NVDAObject(documentBase.TextContainerObject, baseObject.ScriptableObject,
202202 Events for the widget are handled by special event methods on the object.
203203 Commands triggered by input from the user can also be handled by special methods called scripts.
204204 See L{ScriptableObject} for more details.
205-
205+
206206 The only attribute that absolutely must be provided is L{processID}.
207207 However, subclasses should provide at least the L{name} and L{role} attributes in order for the object to be meaningful to the user.
208208 Attributes such as L{parent}, L{firstChild}, L{next} and L{previous} link an instance to other NVDAObjects in the hierarchy.
209209 In order to facilitate access to text exposed by a widget which supports text content (e.g. an editable text control),
210210 a L{textInfos.TextInfo} should be implemented and the L{TextInfo} attribute should specify this class.
211-
211+
212212 There are two main types of NVDAObject classes:
213213 * API classes, which provide the core functionality to work with objects exposed using a particular API (e.g. MSAA/IAccessible).
214214 * Overlay classes, which supplement the core functionality provided by an API class to handle a specific widget or type of widget.
@@ -247,7 +247,7 @@ def findBestAPIClass(cls,kwargs,relation=None):
247247 newAPIClass = cls
248248 if 'getPossibleAPIClasses' in newAPIClass .__dict__ :
249249 for possibleAPIClass in newAPIClass .getPossibleAPIClasses (kwargs ,relation = relation ):
250- if 'kwargsFromSuper' not in possibleAPIClass .__dict__ :
250+ if 'kwargsFromSuper' not in possibleAPIClass .__dict__ :
251251 log .error ("possible API class %s does not implement kwargsFromSuper" % possibleAPIClass )
252252 continue
253253 if possibleAPIClass .kwargsFromSuper (kwargs ,relation = relation ):
@@ -364,7 +364,7 @@ def _isEqual(self,other):
364364 @rtype: boolean
365365 """
366366 return True
367-
367+
368368 def __eq__ (self ,other ):
369369 """Compaires the objects' memory addresses, their type, and uses L{NVDAObject._isEqual} to see if they are equal.
370370 """
@@ -373,7 +373,7 @@ def __eq__(self,other):
373373 if type (self ) is not type (other ):
374374 return False
375375 return self ._isEqual (other )
376-
376+
377377 # As __eq__ was defined on this class, we must provide __hash__ to remain hashable.
378378 # The default hash implementation is fine for our purposes.
379379 def __hash__ (self ):
@@ -415,7 +415,7 @@ def _get_treeInterceptor(self) -> typing.Optional[TreeInterceptor]:
415415 If a treeInterceptor has not been specifically set,
416416 the L{treeInterceptorHandler} is asked if it can find a treeInterceptor containing this object.
417417 @return: the treeInterceptor
418- """
418+ """
419419 if hasattr (self ,'_treeInterceptor' ):
420420 ti = self ._treeInterceptor
421421 if isinstance (ti ,weakref .ref ):
@@ -468,7 +468,7 @@ def _get_name(self) -> str:
468468
469469 def _get_role (self ) -> controlTypes .Role :
470470 """The role or type of control this object represents (example: button, list, dialog).
471- """
471+ """
472472 return controlTypes .Role .UNKNOWN
473473
474474 #: Type definition for auto prop '_get_roleText'
@@ -500,7 +500,7 @@ def _get_roleTextBraille(self):
500500 def _get_value (self ) -> str :
501501 """The value of this object
502502 (example: the current percentage of a scrollbar, the selected option in a combo box).
503- """
503+ """
504504 return ""
505505
506506 #: Typing information for auto property _get_description
@@ -583,7 +583,7 @@ def getActionName(self,index=None):
583583 @rtype: str
584584 """
585585 raise NotImplementedError
586-
586+
587587 def doAction (self ,index = None ):
588588 """Performs an action supported by this object.
589589 If index is not given then the default action will be used if it exists.
@@ -729,15 +729,15 @@ def _get_rowNumber(self):
729729
730730 def _get_presentationalRowNumber (self ):
731731 """
732- An optional version of the rowNumber property
732+ An optional version of the rowNumber property
733733 used purely for speech and braille presentation if implemented.
734734 This is never used for navigational logic.
735735 This property should be implemented if the table has virtual content which may not all be loaded at one time.
736- For example, a table with 1000 rows and 1000 columns,
736+ For example, a table with 1000 rows and 1000 columns,
737737 yet the table only shows perhaps 10 rows by 10 columns at a time.
738- Although the rowNumber might be row 2 of 10,
738+ Although the rowNumber might be row 2 of 10,
739739 the user needs to be told it is perhaps row 500 (taking all virtual rows into account).
740- If the underlying APIs do not distinguish between virtual and physical cell coordinates,
740+ If the underlying APIs do not distinguish between virtual and physical cell coordinates,
741741 then this property should not be implemented.
742742 @rtype: int
743743 """
@@ -751,15 +751,15 @@ def _get_columnNumber(self):
751751
752752 def _get_presentationalColumnNumber (self ):
753753 """
754- An optional version of the columnNumber property
754+ An optional version of the columnNumber property
755755 used purely for speech and braille presentation if implemented.
756756 This is never used for navigational logic.
757757 This property should be implemented if the table has virtual content which may not all be loaded at one time.
758- For example, a table with 1000 rows and 1000 columns,
758+ For example, a table with 1000 rows and 1000 columns,
759759 yet the table only shows perhaps 10 rows by 10 columns at a time.
760- Although the columnNumber might be column 2 of 10,
760+ Although the columnNumber might be column 2 of 10,
761761 the user needs to be told it is perhaps column 500 (taking all virtual columns into account).
762- If the underlying APIs do not distinguish between virtual and physical cell coordinates,
762+ If the underlying APIs do not distinguish between virtual and physical cell coordinates,
763763 then this property should not be implemented.
764764 @rtype: int
765765 """
@@ -783,15 +783,15 @@ def _get_rowCount(self):
783783
784784 def _get_presentationalRowCount (self ):
785785 """
786- An optional version of the rowCount property
786+ An optional version of the rowCount property
787787 used purely for speech and braille presentation if implemented.
788788 This is never used for navigational logic.
789789 This property should be implemented if the table has virtual content which may not all be loaded at one time.
790- For example, a table with 1000 rows and 1000 columns,
790+ For example, a table with 1000 rows and 1000 columns,
791791 yet the table only shows perhaps 10 rows by 10 columns at a time.
792- Although the rowCount might be 10,
793- the user needs to be told the table really has 1000 rows.
794- If the underlying APIs do not distinguish between virtual and physical cell coordinates,
792+ Although the rowCount might be 10,
793+ the user needs to be told the table really has 1000 rows.
794+ If the underlying APIs do not distinguish between virtual and physical cell coordinates,
795795 then this property should not be implemented.
796796 @rtype: int
797797 """
@@ -805,15 +805,15 @@ def _get_columnCount(self):
805805
806806 def _get_presentationalColumnCount (self ):
807807 """
808- An optional version of the columnCount property
808+ An optional version of the columnCount property
809809 used purely for speech and braille presentation if implemented.
810810 This is never used for navigational logic.
811811 This property should be implemented if the table has virtual content which may not all be loaded at one time.
812- For example, a table with 1000 rows and 1000 columns,
812+ For example, a table with 1000 rows and 1000 columns,
813813 yet the table only shows perhaps 10 rows by 10 columns at a time.
814- Although the columnCount might be 10,
815- the user needs to be told the table really has 1000 columns.
816- If the underlying APIs do not distinguish between virtual and physical cell coordinates,
814+ Although the columnCount might be 10,
815+ the user needs to be told the table really has 1000 columns.
816+ If the underlying APIs do not distinguish between virtual and physical cell coordinates,
817817 then this property should not be implemented.
818818 @rtype: int
819819 """
@@ -857,7 +857,7 @@ def _get_tableID(self):
857857 even if the user moves to a cell in the same row/column.
858858 """
859859 raise NotImplementedError
860-
860+
861861 def _get_recursiveDescendants (self ):
862862 """Recursively traverse and return the descendants of this object.
863863 This is a depth-first forward traversal.
@@ -1008,12 +1008,18 @@ def _get_activeChild(self):
10081008 """
10091009 return None
10101010
1011+ #: Type definition for auto prop '_get_isFocusable'
1012+ isFocusable : bool
1013+
10111014 def _get_isFocusable (self ):
10121015 """Whether this object is focusable.
10131016 @rtype: bool
10141017 """
10151018 return controlTypes .State .FOCUSABLE in self .states
10161019
1020+ #: Type definition for auto prop '_get_hasFocus'
1021+ hasFocus : bool
1022+
10171023 def _get_hasFocus (self ):
10181024 """Whether this object has focus.
10191025 @rtype: bool
@@ -1034,7 +1040,7 @@ def scrollIntoView(self):
10341040 def _get_labeledBy (self ):
10351041 """Retrieves the object that this object is labeled by (example: the static text label beside an edit field).
10361042 @return: the label object if it has one else None.
1037- @rtype: L{NVDAObject} or None
1043+ @rtype: L{NVDAObject} or None
10381044 """
10391045 return None
10401046
@@ -1062,7 +1068,8 @@ def _get_isProtected(self):
10621068 isProtected = (controlTypes .State .PROTECTED in self .states or self .role == controlTypes .Role .PASSWORDEDIT )
10631069 # #7908: If this object is currently protected, keep it protected for the rest of its lifetime.
10641070 # The most likely reason it would lose its protected state is because the object is dying.
1065- # In this case it is much more secure to assume it is still protected, thus the end of PIN codes will not be accidentally reported.
1071+ # In this case it is much more secure to assume it is still protected, thus the end of PIN codes
1072+ # will not be accidentally reported.
10661073 if isProtected :
10671074 self .isProtected = isProtected
10681075 return isProtected
@@ -1114,7 +1121,7 @@ def _get_statusBar(self) -> Optional["NVDAObject"]:
11141121 isCurrent : controlTypes .IsCurrent #: type info for auto property _get_isCurrent
11151122
11161123 def _get_isCurrent (self ) -> controlTypes .IsCurrent :
1117- """Gets the value that indicates whether this object is the current element in a set of related
1124+ """Gets the value that indicates whether this object is the current element in a set of related
11181125 elements. This maps to aria-current.
11191126 """
11201127 return controlTypes .IsCurrent .NO
@@ -1284,7 +1291,7 @@ def event_gainFocus(self):
12841291 vision .handler .handleGainFocus (self )
12851292
12861293 def event_loseFocus (self ):
1287- # Forget the word currently being typed as focus is moving to a new control.
1294+ # Forget the word currently being typed as focus is moving to a new control.
12881295 speech .clearTypedWordBuffer ()
12891296
12901297 def event_focusExited (self ):
0 commit comments