Skip to content

Commit

Permalink
Removed displayed code in the error message for config file parsing e…
Browse files Browse the repository at this point in the history
…rrors
  • Loading branch information
sushimon committed Jul 8, 2023
1 parent 5356064 commit 385942f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python_ta/reporters/node_printers.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ def render_pep8_errors_e306(msg, _node, source_lines=None):
yield from render_context(msg.line, msg.line + 2, source_lines)


def render_config_parsing_error(_msg, _node, _source_lines=None):
"""Render an empty message for any errors raised when parsing the configuration file."""
yield (None, slice(None, None), LineType.ERROR, "")


CUSTOM_MESSAGES = {
"missing-module-docstring": render_missing_docstring,
"missing-class-docstring": render_missing_docstring,
Expand All @@ -265,6 +270,7 @@ def render_pep8_errors_e306(msg, _node, source_lines=None):
"too-many-arguments": render_too_many_arguments,
"missing-space-in-doctest": render_missing_space_in_doctest,
"pep8-errors": render_pep8_errors,
"unknown-option-value": render_config_parsing_error,
}


Expand Down

0 comments on commit 385942f

Please sign in to comment.