Package qm :: Module diagnostic :: Class DiagnosticSet
[hide private]
[frames] | no frames]

Class DiagnosticSet
source code

Instance Methods [hide private]
  __init__(self)
Initialize a new set of diagnostics.
  ReadFromFile(self, path)
Load diagnostics from a file.
  Generate(self, tag, severity="error", output=None, **substitutions)
Generate a diagnostic message.

Class Variables [hide private]
__comment_regex  
__separator_regex  

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize a new set of diagnostics.

ReadFromFile(self, path)

source code 

Load diagnostics from a file.

'path' -- Path to the file containing diagnostics.

Generate(self, tag, severity="error", output=None, **substitutions)

source code 

Generate a diagnostic message.

'tag' -- The tag of the diagnostic to generate.

'severity' -- A string representing the severity of the diagnostic, for instance "warning" or "error".

'output' -- If not 'None', the a file object to which the a full diagnostic is written.

'substitutions' -- Named values for substitution into the diagnostic message.

returns -- The bare diagnostic message.

Class Variable Details [hide private]

__comment_regex

Value:
^[ \t]*#.*$                                                            
      

__separator_regex

Value:
^@