pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

Black implementation test

Open coder2020official opened this issue 1 year ago • 19 comments

@Badiboy this is how approximately black looks like

coder2020official avatar Jan 05 '24 17:01 coder2020official

I PERSONALLY don't like this type of formatting.

image

It gives nothing valuable but lot of lines. It's just one file: you got 1400 lines for nothing. It's valuable for ones who are paid for lines of code :)

Badiboy avatar Jan 05 '24 18:01 Badiboy

Idk, since you like changing formatting frequently, I thought you would like an automated system for that

coder2020official avatar Jan 05 '24 18:01 coder2020official

I will see whether I can change something in settings though to avoid some of the changes

coder2020official avatar Jan 05 '24 18:01 coder2020official

Idk, since you like changing formatting frequently

I don't like ))) I just make some updates to formatting while making valuable updates ))

Badiboy avatar Jan 05 '24 18:01 Badiboy

I just tried yapf with a style of facebook, here are some screenshots if you are interested: image image image

This one is still similar to black in some ways, but there are differences. Thoughts? We still have to try to obey PEP-8?

coder2020official avatar Jan 05 '24 18:01 coder2020official

We can technically ignore apihelper-like files(also asyncio_helper); Maybe in the future I will even try to get rid of these files due to a mess over there

coder2020official avatar Jan 05 '24 18:01 coder2020official

May be just live things as is? 😂😂😂

Badiboy avatar Jan 05 '24 18:01 Badiboy

Well, this is not my first time caring about PEP-8 - it is better if we at least try to follow it to some extent.

coder2020official avatar Jan 05 '24 19:01 coder2020official

I'm not in favour of carry about anything "because of" - if that does not bring any value. I do not see what value black formatting brings except "now we hava black formatting"...

Badiboy avatar Jan 05 '24 19:01 Badiboy

It indeed brings the value of cleaner code

coder2020official avatar Jan 05 '24 19:01 coder2020official

"Cleaner code" is not a value. It's "cleaner code bacause of cleaner code".

Badiboy avatar Jan 05 '24 19:01 Badiboy

Ok, if it does not harm project in any way - why not accept the new formatting?

coder2020official avatar Jan 05 '24 19:01 coder2020official

"Add value" is the good reason of bring changes. "Why not" is the bad reason of bring changes.

I said it many times before. I say it now. I will say it in future.

Badiboy avatar Jan 05 '24 19:01 Badiboy

Well then I can argue that by improving formatting, we follow suggested PEP-8

coder2020official avatar Jan 05 '24 19:01 coder2020official

And this is a better practise. The reason is "adding a value", not "why not"

coder2020official avatar Jan 05 '24 19:01 coder2020official

"we follow suggested PEP-8" and it will give the project.... What? "Clear code"?

Badiboy avatar Jan 05 '24 19:01 Badiboy

"this is a better practise" - do you follow all "better practices" in your life because they are better practices?

Badiboy avatar Jan 05 '24 19:01 Badiboy

You should try to follow best practices as far as you can. They are created not for just existence but to help you understand your code faster

coder2020official avatar Jan 05 '24 19:01 coder2020official

I PERSONALLY don't like this type of formatting.

image

It gives nothing valuable but lot of lines. It's just one file: you got 1400 lines for nothing. It's valuable for ones who are paid for lines of code :)

Consistency in the code formatting for better readability is kinda worth it, provided no one really cares about the number of lines and the size of the py-files (at least in my opinion)

Cub11k avatar Apr 25 '24 17:04 Cub11k