Re: [sage-devel] line length in docstring and tests

2020-06-01 Thread Michael Orlitzky
On 5/30/20 9:25 AM, 'Reimundo Heluani' via sage-devel wrote: > > Thanks, my question is mainly about output strings, how do you break them > with > ellipsis? > Oh, I don't know. I break them manually and let the line breaks show up in the HTML. Users may see wrapped output anyway from either th

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread 'Reimundo Heluani' via sage-devel
On May 30, John H Palmieri wrote: Just for kicks, I counted the number of .py and .pyx files in the Sage library, and then counted the ones with lines longer than 80 characters in their docstrings/doctests. 84% of them had such lines. Thanks, that was my impression, I looked and looked and found

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread John H Palmieri
It seems that over 80% of the files in the Sage library have lines longer than 80 characters, and about 50% of files have lines in doctests which are longer than 80 characters. On Saturday, May 30, 2020 at 9:14:59 AM UTC-7, John H Palmieri wrote: > > Lines should be shorter than 80 characters

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread John H Palmieri
Just for kicks, I counted the number of .py and .pyx files in the Sage library, and then counted the ones with lines longer than 80 characters in their docstrings/doctests. 84% of them had such lines. On Saturday, May 30, 2020 at 9:14:59 AM UTC-7, John H Palmieri wrote: > > Lines should be shor

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread John H Palmieri
Lines should be shorter than 80 characters when possible. If it isn't possible because it will cause confusion, break a doctest, make a doctest unhelpful, etc., then you can make an exception. There are plenty of exceptions in the Sage library already, for example https://git.sagemath.org/sage.

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread 'Reimundo Heluani' via sage-devel
On May 30, Michael Orlitzky wrote: On 5/30/20 8:51 AM, 'Reimundo Heluani' via sage-devel wrote: I've looked through the code and found numerous instances of long times in examples and tests blocks. So my question is: is there a policy about these things? My guess is to leave the long lines of o

Re: [sage-devel] line length in docstring and tests

2020-05-30 Thread Michael Orlitzky
On 5/30/20 8:51 AM, 'Reimundo Heluani' via sage-devel wrote: > > I've looked through the code and found numerous instances of long times in > examples and tests blocks. So my question is: is there a policy about these > things? My guess is to leave the long lines of output without wrapping. >

[sage-devel] line length in docstring and tests

2020-05-30 Thread 'Reimundo Heluani' via sage-devel
Hello, in the developer's guide https://doc.sagemath.org/html/en/developer/coding_basics.html#documentation-strings It says explicitly that lines should be shorter than 80 characters: "Lines should be shorter than 80 characters. If in doubt, read PEP8: Maximum Line Length." That PEP8 furth