You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although #21 was fixed in #35 (by these 5 lines in 4dc8b2b), the current error does not list the line number, nor indicate that it's about the last line of the file:
[
{
'code': 'no_line_separators',
'message': 'Every line must end with either a carriage return and line feed characters or just a line feed character',
'line': None
}
]
Either:
the line number must be specified; and/or
the text message should be made explicit it's about the last line.
Add explicit_line_no=None to the _add_error definition, plus self._line_no if explicit_line_no = None else explicit_line_no and a self.lines[-1]._line_no to the _add_error call in the 'empty content after \r?\n' check in validate_contents.
Change the text to 'Every line, including the last one, must end with either a carriage return and line feed characters or just a line feed character'
The text was updated successfully, but these errors were encountered:
Although #21 was fixed in #35 (by these 5 lines in
4dc8b2b
), the current error does not list the line number, nor indicate that it's about the last line of the file:Either:
So the problem in the code is here:
sectxt/sectxt/__init__.py
Lines 92 to 93 in 79bb386
It set's the
_line_no
toNone
, and then invalidate_contents
the check is done:sectxt/sectxt/__init__.py
Lines 284 to 290 in 79bb386
In the
_add_error
the_line_no
is used:sectxt/sectxt/__init__.py
Lines 95 to 101 in 79bb386
I would propose doing both:
explicit_line_no=None
to the_add_error
definition, plusself._line_no if explicit_line_no = None else explicit_line_no
and aself.lines[-1]._line_no
to the_add_error
call in the 'empty content after\r?\n
' check invalidate_contents
.The text was updated successfully, but these errors were encountered: