question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switch from 88 character lines back to 80

See original GitHub issue

As much as I like black, and as much as I understand its advantages, its default maximum line length drives me crazy. The maximum of 80 is there for a good reason, as terminals usually have this limit. So if edit in a traditional editor, or look at the docs or the code in a terminal, a longer line-length makes working very difficult. And this is not that uncommon, think, e.g., about working on a server without GUI. I guess this is a plea that not everyone is working in a Notebook or with Atom, Sublime, VSCode etc.

I suggest to restrict the max-line-length to 80. As far as I could see, there are three places currently with a max-line-length:

verde-master/> grep -rin 'line-length'
    .pylintrc:109: max-line-length=100
    .stickler.yml:6: max-line-length: 88
    setup.cfg:10: max-line-length = 88

I attach here two screenshots, one from GVim and one from an IPython console.

IPython: Desktop-verde-master_002 coordinates py (~-Desktop-verde-master-verde) - GVIM_001

The examples are for documentation, but the same applies for the code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
djhoesecommented, Mar 26, 2019

FYI @prisae this conversation made me rethink my own strategies for some of the libraries I maintain. I’m thinking about switching to 80 characters for docstrings as it is more likely that people will be looking at documentation on smaller screens. We (again, not a verde maintainer) will prefer 80 characters for code but will allow up to 120 characters if it makes sense (it rarely does).

Thanks for bringing this to my attention as well.

1reaction
leouiedacommented, Mar 25, 2019

But then again, maybe, I am just too old school

I constantly struggle with these two sides of myself 😃

So I close this issue, and I apologize for the tempest in a tea pot.

No need to apologize. It’s great that you brought this to my attention and I’ll definitely keep it in mind when starting new projects. I hand’t even considered that this would be a problem.

I suggest to limit docstrings to 80 characters.

That is a sensible thing to do. From the black repo, it seems like they are working on this. When the implement it, we can take another look at converting the repo to 80 chars again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do you use black with its default line length of 88? - Reddit
Preferred line length for code is 78 or 79 characters, because standard text terminal is 80x25 or 80x50 characters in size. It does...
Read more >
Ask Hackaday: Are 80 Characters Per Line Still Reasonable In ...
A common compromise is to encourage 80 characters, but allow up to 100 or 120 characters, and draw the hard limit there. This...
Read more >
Why is 80 characters the 'standard' limit for code width?
If lines are too long, the line jumping becomes too hard because you "lose the line" while going back to the start of...
Read more >
python - Why does PEP-8 specify a maximum line length of 79 ...
An 80 character line length has been standard since we were using teletypes, so 79 characters seems like a pretty safe choice. Most...
Read more >
Ways to Set the Number of Characters Per Line in MS Word
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found