Page MenuHomePhabricator

[RFC] Allow 100 characters per line
Closed, DeclinedPublic

Assigned To
None
Authored By
Kizule
Feb 1 2018, 7:39 PM
Referenced Files
F12955749: r.png
Feb 2 2018, 9:54 PM
F12944838: Snímek z 2018-02-01 22-54-38.png
Feb 1 2018, 9:58 PM
Tokens
"Pterodactyl" token, awarded by zhuyifei1999."Dislike" token, awarded by matej_suchanek.

Description

I starting rfc to leave limit for number of characters on gerrit be 100 per line because current limit of 80 making problems with patches. Example is: https://gerrit.wikimedia.org/r/#/c/372064

Event Timeline

demon subscribed.

What do you mean by problems? Just click the gear icon and change your diff preferences to 100 or whatever number works for you (mine is set to 72). I see no reason to change this.

Also: this is not an RFC-level problem, removing that tag.

Dvorapa edited projects, added Pywikibot-RfCs, Pywikibot, Pywikibot-General; removed Gerrit.
Dvorapa updated the task description. (Show Details)

I was a little bit confused in https://gerrit.wikimedia.org/r/#/c/372064. Jenkins added +1. After a few months I uploaded a new file, but the old left unchanged and Jenkins complained about the unchanged file!

There was added a limit for new code to have lines under 80 characters, but old lines still can pass with 100.

But this limit seems too restrictive to me. I would leave 100 for old and 100 for new code. Therefore we started this RFC if 100 characters per line would be acceptable for the community.

Dvorapa renamed this task from [RFC] Allow 100 characters per line to [RFC] Allow 100 characters per line also for new code.Feb 1 2018, 8:03 PM

Ah, I didn't see the Jenkins history. Yeah, that could be problematic. That's because tox was upgraded, I believe?

Dvorapa renamed this task from [RFC] Allow 100 characters per line also for new code to [RFC] Allow 100 characters per line.Feb 1 2018, 8:19 PM
Dvorapa added subscribers: Xqt, valhallasw, Magul and 3 others.

Don‘t see any reason to ignore PEP8 especially for new lines. The patchset you pointed out failed due syntax errors. And btw it is very easy to keep the changed lines below 80 chars.

Change 407507 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Revert "tox.ini: Configure Jenkins to fail when lines are longer than 79 characters"

https://gerrit.wikimedia.org/r/407507

Don‘t see any reason to ignore PEP8 especially for new lines.

Well, PEP8 allows 80–100 if a community is decided to allow more

And btw it is very easy to keep the changed lines below 80 chars.

In these days of 16:9 monitors and 1920x1080 resolutions (usual notebook for everyday use) it is funny to restrict lines to a third of a monitor just to be able to make 3-way comparison? Or why? In addition it sometimes requires to add some crazy hacks like

...\
...

(I personally *hate* this one in code)

Change 407507 abandoned by Zoranzoki21:
Revert "tox.ini: Configure Jenkins to fail when lines are longer than 79 characters"

Reason:
I have problem with cannot merge. I will upload new change

https://gerrit.wikimedia.org/r/407507

Change 407517 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[pywikibot/core@master] Allow 100 characters per line

https://gerrit.wikimedia.org/r/407517

@Dvorava: let’s have a Monitor with 1920 dots resolution so see patch diffs side by side in a normal char size of 12 points. Gives 80 chars. Ok say 10 points is enough. But you need some frames an line numbers. I think this is a good reason for 80 chars limit. Or take python‘s IDLE. The default wide is 80 chars. Good enough to pin to windows side by side without needing a slider so show the lines. You may use brackets zu continue lines too, divide code in smaller parts to avoid indenting, shorten expressions by assigning it to identifiers etc.

Well, for example Gerrit, on my current machine, 7 years old laptop, 15.6'' 1366x768, can almost handle 100 chars side-by-side (I think 96 or so, but I have got a dock on the left side of the screen. Otherwise it would be over 100. See screenshot). But I am going to buy a new one and I think this is really too narrow for modern ones. And as for reading: It is really too narrow to even keep track of what the code is doing when reading the code. I don't say: Let's remove the limit at all. I don't say let's break PEP8. I just simply say this is not really helpful in anything. Gerrit, 82 chars on marked line, still a space on the right and even more if left dock would be at the bottom:

Snímek z 2018-02-01 22-54-38.png (768×1 px, 371 KB)

Sure but urls are ignored by that rule for good reasons.

This comment was removed by Xqt.

In these days of 16:9 monitors and 1920x1080 resolutions (usual notebook for everyday use) it is funny to restrict lines to a third of a monitor just to be able to make 3-way comparison? Or why?

The screen resolution of my desktop computer is 1280 * 1024.

r.png (687×1 px, 65 KB)

It's an old monitor, but it's been working fine for me.

According to statcounter statistics for Jan 2018, 2.92% of desktop have a screen resolution of 1280*720 and 4.44% of them 1280*1024.
However I don't mind if the limit is changed if I'm the only one here who feels more comfortable with 80 character limit.

Example: T189615

If we disable this, problems like my will not happen.

In T186255#4047743, @Zoranzoki21 wrote:

Example: T189615

If we disable this, problems like my will not happen.

I don't believe it. Could you figure out the problem.

In T186255#4062984, @Zoranzoki21 wrote:

Status of this?

Declined for me

In T186255#4062984, @Zoranzoki21 wrote:

Status of this?

Declined for me

Ok. Declined. I am sorry.

Change 407517 abandoned by Zoranzoki21:
Allow 100 characters per line

Reason:
Nothing. We have to live with limit.

https://gerrit.wikimedia.org/r/407517