Skip to content

Commit

Permalink
Add DeprecationWarning for functional tests output with confidence
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord committed Nov 21, 2021
1 parent fa657a9 commit 053eb6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pylint/testutils/output_line.py
Expand Up @@ -2,6 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE

import collections
import warnings
from typing import Any, NamedTuple, Optional, Sequence, Tuple, Union

from astroid import nodes
Expand Down Expand Up @@ -106,6 +107,11 @@ def from_csv(cls, row: Union[Sequence[str], str]) -> "OutputLine":
if isinstance(row, Sequence):
column = cls._get_column(row[2])
if len(row) == 5:
warnings.warn(
"In pylint 3.0 tests output should always include the expected confidence"
"level. An OutputLine should thus have a length of 6.",
DeprecationWarning,
)
return cls(row[0], int(row[1]), column, row[3], row[4], HIGH.name)
if len(row) == 6:
return cls(row[0], int(row[1]), column, row[3], row[4], row[5])
Expand Down

0 comments on commit 053eb6c

Please sign in to comment.