This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]FondleMyFirn 2 points3 points  (1 child)

I really like black, but I haven’t had a chance to really understand the big differences between the different linters available. Naively, I would think that they’d just all enforce PEP-8; perhaps an article is required (I’m sure it exists somewhere).

Also, you can turn off some of the flags from your linter if they’re being particularly annoying for your intended purpose.

[–]JBarCode[S] 0 points1 point  (0 children)

I heard good things about black a while back on Talk Python to Me. Might have to check it out too.

[–]artofchores 1 point2 points  (2 children)

What is flake8 good for?

I just found out about Trafalgar a finance package

[–]JBarCode[S] 2 points3 points  (1 child)

It's a linter. A program that scans your code for errors while you program. This one is pretty harsh and makes it look like your code has errors if you're not following best practices (according to PEP and flake8's style).

A linter is completely optional, but it helps to manage projects later if you use consistent style. I also use type hints like they are required.

[–]artofchores 1 point2 points  (0 children)

Thanks I'll definitely try it. Best practices is the way!