4141
4242state = {}
4343
44- # addons that are blocked from running because they are incompatible
44+ # Add-ons that are blocked from running because they are incompatible
4545_blockedAddons = set ()
4646
4747def loadState ():
@@ -77,7 +77,7 @@ def saveState():
7777 log .debugWarning ("Error saving state" , exc_info = True )
7878
7979def getRunningAddons ():
80- """ Returns currently loaded addons .
80+ """ Returns currently loaded add-ons .
8181 """
8282 return getAvailableAddons (filterFunc = lambda addon : addon .isRunning )
8383
@@ -96,7 +96,7 @@ def getIncompatibleAddons(
9696 ))
9797
9898def completePendingAddonRemoves ():
99- """Removes any addons that could not be removed on the last run of NVDA"""
99+ """Removes any add-ons that could not be removed on the last run of NVDA"""
100100 user_addons = os .path .abspath (os .path .join (globalVars .appArgs .configPath , "addons" ))
101101 pendingRemovesSet = state ['pendingRemovesSet' ]
102102 for addonName in list (pendingRemovesSet ):
@@ -166,7 +166,7 @@ def terminate():
166166
167167def _getDefaultAddonPaths ():
168168 """ Returns paths where addons can be found.
169- For now, only <userConfig\a ddons is supported.
169+ For now, only <userConfig> \a ddons is supported.
170170 @rtype: list(string)
171171 """
172172 addon_paths = []
@@ -448,18 +448,19 @@ def loadModule(self, name):
448448 return None
449449
450450 def getTranslationsInstance (self , domain = 'nvda' ):
451- """ Gets the gettext translation instance for this addon .
452- <addon-path< \locale will be used to find .mo files, if exists.
451+ """ Gets the gettext translation instance for this add-on .
452+ <addon-path> \ \ locale will be used to find .mo files, if exists.
453453 If a translation file is not found the default fallback null translation is returned.
454- @param domain: the tranlation domain to retrieve. The 'nvda' default should be used in most cases.
454+ @param domain: the translation domain to retrieve. The 'nvda' default should be used in most cases.
455455 @returns: the gettext translation class.
456456 """
457457 localedir = os .path .join (self .path , "locale" )
458458 return gettext .translation (domain , localedir = localedir , languages = [languageHandler .getLanguage ()], fallback = True )
459459
460460 def runInstallTask (self ,taskName ,* args ,** kwargs ):
461461 """
462- Executes the function having the given taskName with the given args and kwargs in the addon's installTasks module if it exists.
462+ Executes the function having the given taskName with the given args and kwargs,
463+ in the add-on's installTasks module if it exists.
463464 """
464465 if not hasattr (self ,'_installTasksModule' ):
465466 self ._installTasksModule = self .loadModule ('installTasks' )
@@ -502,7 +503,7 @@ def getDocFilePath(self, fileName=None):
502503def getCodeAddon (obj = None , frameDist = 1 ):
503504 """ Returns the L{Addon} where C{obj} is defined. If obj is None the caller code frame is assumed to allow simple retrieval of "current calling addon".
504505 @param obj: python object or None for default behaviour.
505- @param frameDist: howmany frames is the caller code. Only change this for functions in this module.
506+ @param frameDist: how many frames is the caller code. Only change this for functions in this module.
506507 @return: L{Addon} instance or None if no code does not belong to a add-on package.
507508 @rtype: C{Addon}
508509 """
@@ -530,7 +531,7 @@ def initTranslation():
530531 addon = getCodeAddon (frameDist = 2 )
531532 translations = addon .getTranslationsInstance ()
532533 # Point _ to the translation object in the globals namespace of the caller frame
533- # FIXME: shall we retrieve the caller module object explicitly?
534+ # FIXME: should we retrieve the caller module object explicitly?
534535 try :
535536 callerFrame = inspect .currentframe ().f_back
536537 callerFrame .f_globals ['_' ] = translations .gettext
@@ -610,7 +611,7 @@ def createAddonBundleFromPath(path, destDir=None):
610611 """ Creates a bundle from a directory that contains a a addon manifest file."""
611612 basedir = os .path .abspath (path )
612613 # If caller did not provide a destination directory name
613- # Put the bundle at the same level of the addon 's top directory,
614+ # Put the bundle at the same level as the add-on 's top-level directory,
614615 # That is, basedir/..
615616 if destDir is None :
616617 destDir = os .path .dirname (basedir )
@@ -672,7 +673,7 @@ class AddonManifest(ConfigObj):
672673docFileName = string(default=None)
673674
674675# NOTE: apiVersion:
675- # Eg : 2019.1.0 or 0.0.0
676+ # EG : 2019.1.0 or 0.0.0
676677# Must have 3 integers separated by dots.
677678# The first integer must be a Year (4 characters)
678679# "0.0.0" is also valid.
@@ -682,7 +683,7 @@ class AddonManifest(ConfigObj):
682683
683684 def __init__ (self , input , translatedInput = None ):
684685 """ Constructs an L{AddonManifest} instance from manifest string data
685- @param input: data to read the manifest informatinon
686+ @param input: data to read the manifest information
686687 @type input: a fie-like object.
687688 @param translatedInput: translated manifest input
688689 @type translatedInput: file-like object
0 commit comments