Skip to content

Commit

Permalink
Rename method to avoid py38 reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jul 10, 2024
1 parent 01c7f93 commit 797e273
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pylint/testutils/output_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class OutputLine(NamedTuple):
def from_msg(cls, msg: Message, check_endline: bool = True) -> OutputLine:
"""Create an OutputLine from a Pylint Message."""
column = cls._get_column(msg.column)
end_line = cls._get_py38_none_value(msg.end_line, check_endline)
end_column = cls._get_py38_none_value(msg.end_column, check_endline)
end_line = cls._get_end_line_and_end_col(msg.end_line, check_endline)
end_column = cls._get_end_line_and_end_col(msg.end_column, check_endline)
return cls(
msg.symbol,
msg.line,
Expand All @@ -63,7 +63,7 @@ def _get_column(column: str | int) -> int:
return int(column)

@staticmethod
def _get_py38_none_value(value: _T, check_endline: bool) -> _T | None:
def _get_end_line_and_end_col(value: _T, check_endline: bool) -> _T | None:
"""Used to make end_line and end_column None as indicated by our version
compared to `min_pyver_end_position`.
"""
Expand All @@ -84,10 +84,10 @@ def from_csv(
line = int(row[1])
column = cls._get_column(row[2])
end_line = cls._value_to_optional_int(
cls._get_py38_none_value(row[3], check_endline)
cls._get_end_line_and_end_col(row[3], check_endline)
)
end_column = cls._value_to_optional_int(
cls._get_py38_none_value(row[4], check_endline)
cls._get_end_line_and_end_col(row[4], check_endline)
)
# symbol, line, column, end_line, end_column, node, msg, confidences
assert len(row) == 8
Expand Down

0 comments on commit 797e273

Please sign in to comment.