original_docstring: Append any imported rules at the end of the rulesets specified in mode.importDict
docstring: Append any imported rules at the end of the rulesets specified in mode.importDict
docstring_tokens: Append any imported rules at the end of the rulesets specified in mode . importDict
code: def addImportedRules(self, mode, rulesDict, rulesetName):
          """Append any imported rules at the end of the rulesets specified in mode.importDict"""
          if self.importedRulesets.get(rulesetName):
              return
          self.importedRulesets[rulesetName] = True
          names = mode.importDict.get(
              rulesetName, []) if hasattr(mode, 'importDict') else []
          for name in names:
              savedBunch = self.modeBunch
              ok = self.init_mode(name)
              if ok:
                  rulesDict2 = self.rulesDict
                  for key in rulesDict2.keys():
                      aList = self.rulesDict.get(key, [])
                      aList2 = rulesDict2.get(key)
                      if aList2:
                          # Don't add the standard rules again.
                          rules = [z for z in aList2 if z not in aList]
                          if rules:
                              aList.extend(rules)
                              self.rulesDict[key] = aList
              self.initModeFromBunch(savedBunch)
code_tokens: def addImportedRules ( self , mode , rulesDict , rulesetName ) : if self . importedRulesets . get ( rulesetName ) : return self . importedRulesets [ rulesetName ] = True names = mode . importDict . get ( rulesetName , [ ] ) if hasattr ( mode , 'importDict' ) else [ ] for name in names : savedBunch = self . modeBunch ok = self . init_mode ( name ) if ok : rulesDict2 = self . rulesDict for key in rulesDict2 . keys ( ) : aList = self . rulesDict . get ( key , [ ] ) aList2 = rulesDict2 . get ( key ) if aList2 : rules = [ z for z in aList2 if z not in aList ] if rules : aList . extend ( rules ) self . rulesDict [ key ] = aList self . initModeFromBunch ( savedBunch )
short_docstring: Append any imported rules at the end of the rulesets specified in mode.importDict
short_docstring_tokens: Append any imported rules at the end of the rulesets specified in mode . importDict
comment: """Append any imported rules at the end of the rulesets specified in mode.importDict"""$SEP$# Don't add the standard rules again.