![]() Spend your time on more valuable things, like what your code is doing. No more config files, no more arguing with your coworkers. This means you don't get to choose what formatting style you use, but it also means you don't need to decide either: once you've adopted Black, you never need to think about Python formatting again. It's the "uncompromising Python code formatter". You basically only get to choose the maximum line length that you want, and everything else is decided by the formatter. Importantly, Black has minimal configuration. It's like prettier, but for Python instead of JavaScript. py files and the correct formatting is applied for you. Is there a way to avoid this mess? How can we get rid of all this incidental work? Give black a tryīlack is a tool that auto-formats your Python code. It's a distraction from your real work: laying out brackets one way or another isn't going to make your software run any better (but if the closing bracket isn't on its own new line then I'll gut you like the dog you are!). This is all just incidental bullshit though. fight a co-worker to the death on top of a castle tower in a thunderstorm over the proper way to lay out brackets.PyLint) rules, and then spend cumulative hours tweaking your code to make the linter stop yelling at you spend time experimenting with different formatting styles. ![]() ![]() You want your code to look professional, but it can be a time-sink. Umm, is that line too long though? We could do this for hours.įormatting your code is important, but it's easy to get lost in the details. ![]()
0 Comments
Leave a Reply. |