original_docstring: 
          Load bug search definitions from yaml.
  
          @return: list of BugSearchDef objects
          
docstring: Load bug search definitions from yaml.
docstring_tokens: Load bug search definitions from yaml .
code: def _load_bug_definitions(self):
          """
          Load bug search definitions from yaml.
  
          @return: list of BugSearchDef objects
          """
          path = os.path.join(constants.PLUGIN_YAML_DEFS, "bugs.yaml")
          with open(path) as fd:
              yaml_defs = yaml.safe_load(fd.read())
  
          if not yaml_defs:
              return
  
          plugin_bugs = yaml_defs.get(constants.PLUGIN_NAME, {})
          bugs = plugin_bugs.get(self._yaml_defs_group, {})
          for id in bugs:
              bug = bugs[id]
              reason_format = bug.get("reason-format-result-groups")
              _def = BugSearchDef(bug["expr"],
                                  bug_id=str(id),
                                  hint=bug.get("hint"),
                                  reason=bug["reason"],
                                  reason_format_result_groups=reason_format)
              bdef = {"def": _def}
  
              ds = os.path.join(constants.DATA_ROOT, bug["path"])
              if bug.get("allow-all-logs", True) and constants.USE_ALL_LOGS:
                  ds = "{}*".format(ds)
  
              bdef["datasource"] = ds
              self._bug_defs.append(bdef)
code_tokens: def _load_bug_definitions ( self ) : path = os . path . join ( constants . PLUGIN_YAML_DEFS , "bugs.yaml" ) with open ( path ) as fd : yaml_defs = yaml . safe_load ( fd . read ( ) ) if not yaml_defs : return plugin_bugs = yaml_defs . get ( constants . PLUGIN_NAME , { } ) bugs = plugin_bugs . get ( self . _yaml_defs_group , { } ) for id in bugs : bug = bugs [ id ] reason_format = bug . get ( "reason-format-result-groups" ) _def = BugSearchDef ( bug [ "expr" ] , bug_id = str ( id ) , hint = bug . get ( "hint" ) , reason = bug [ "reason" ] , reason_format_result_groups = reason_format ) bdef = { "def" : _def } ds = os . path . join ( constants . DATA_ROOT , bug [ "path" ] ) if bug . get ( "allow-all-logs" , True ) and constants . USE_ALL_LOGS : ds = "{}*" . format ( ds ) bdef [ "datasource" ] = ds self . _bug_defs . append ( bdef )
short_docstring: Load bug search definitions from yaml.
short_docstring_tokens: Load bug search definitions from yaml .
comment: """
          Load bug search definitions from yaml.
  
          @return: list of BugSearchDef objects
          """