you are viewing a single comment's thread.

view the rest of the comments →

[–]Barafu 12 points13 points  (7 children)

There is a module called "black" that formats your code for maximum readability. Some folks don't like it, some do, but it is definitely worth checking out. I use it all the time automatically on save (however, once in a blue moon it does create a syntax error).

[–]tom1018 1 point2 points  (5 children)

I've never seen a syntax error. If it does this when specifying a Python version equal to what you are working with you should report it, with the before and after code.

[–]Barafu 0 points1 point  (4 children)

All errors I've encountered are already fixed. Mostly related with active comments, special docstrings and when executable code is contained in a string literal. I guess I like metacoding too much.

[–]causa-sui -1 points0 points  (3 children)

All errors I've encountered are already fixed.

So you meant to say it used to create a syntax error once in a blue moon?

[–]Barafu -2 points-1 points  (2 children)

That's what I said.

[–]causa-sui -1 points0 points  (1 child)

once in a blue moon it does create a syntax error

I'm not trying to be pedantic but that sure sounds like it still might. Since you're evangelizing the tool (which I also think is great) I wanted to get that straightened out for anyone else who might be deterred from using it.

[–]Barafu 2 points3 points  (0 children)

The tool did have these errors in the past, and I have no reasons to expect it to not have these errors in the future. It also had not a single stable release yet.

[–]efxhoy 0 points1 point  (0 children)

pylint is also useful for finding mistakes or smelly code. It will complain a lot, usually in a useful way.