Okay, so mostly this ticket is just noise by me as the specification is
highly misleading. It is really looking for an end-of-line character \n at
the end of the file, which does not give a blankline. It would be good if
we could somehow explain this somewhere, especially in how the linter
fails. Although I guess we don't have much choice about that... *sigh*
Best,
Travis
On Monday, February 13, 2023 at 4:33:36 PM UTC+9 Travis Scrimshaw wrote:
> Hi everyone,
>To me, the title seems obvious, but I hold a different opinion than the
> linter that has become an enforced code style. I want to see what the
> consensus of the community is on this.
>
> Paraphrasing slightly from https://www.flake8rules.com/rules/W391.html,
> there should be one and exactly one blank line. Not zero, not two.
>
> To me, a blank line at the end of a file would be
>
> "
> blah
>
> "
>
> In particular, there is a "\n" at the end of "blah" with nothing else
> beyond it exact the EOF character. However, our linter is currently trying
> to enforce that files end as
>
> "
> blah
> "
>
> In particular, immediately after "blah" is the EOF. In my mind, this is
> zero blanklines. Otherwise I see no way to obtain zero blanklines as per
> the specification.
>
> My 2 cents, I enjoy having that blankline as additional separation of the
> code from the bottom of my screen, although it is a bit of a more
> historical artifact from what I found by reading SE and SO. If we agree
> that we want to keep enforcing the current linter specification (which I
> don't recall we agreed to as a community, but I do really appreciate all of
> the work Frédéric has done to standardize the code) but also agree that it
> is not enforcing one blankline, can we change the output somehow to not
> suggest a contradiction?
>
> Best,
> Travis
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/ab8fb914-13ae-4b8f-b7d2-0ddf63bee545n%40googlegroups.com.