montepy.input_parser.parser_base.SLY_Supressor#
- class montepy.input_parser.parser_base.SLY_Supressor#
Bases:
object
This is a fake logger meant to mostly make warnings dissapear.
Methods:
Clears the error queue and returns all errors.
critical
(msg, *args, **kwargs)debug
(msg, *args, **kwargs)error
(msg, *args, **kwargs)info
(msg, *args, **kwargs)parse_error
(msg[, token, lineno, index])Adds a SLY parsing error to the error queue for being dumped later.
warning
(msg, *args, **kwargs)- clear_queue()#
Clears the error queue and returns all errors.
Returns a list of dictionaries. The dictionary has the keys: “message”, “token”, “line.
- Returns:
A list of the errors since the queue was last cleared.
- Return type:
list
- critical(msg, *args, **kwargs)#
- debug(msg, *args, **kwargs)#
- error(msg, *args, **kwargs)#
- info(msg, *args, **kwargs)#
- parse_error(msg, token=None, lineno=0, index=0)#
Adds a SLY parsing error to the error queue for being dumped later.
- Parameters:
msg (str) – The message to display.
token (Token) – the token that caused the error if any.
lineno (int) – the current lineno of the error (from SLY not the file), if any.
- warning(msg, *args, **kwargs)#