DEV Community

Phan Hieu Nguyen
Phan Hieu Nguyen

Posted on

A few analysis tools for Python

Summary

I added some tools and notes to help anyone who wants to contribute to my opensource can follow similar standards
Repo link
Merge commit

Features

A code formatter (black), a linter (flake8) and Vscode environment settings.

Focus

Newly graduated students will be very similar with JS web development. I think JS is the most popular for now. So when we work with JS, there are some must have tools/extension for VScode. Prettier, ESLint are the most popular. I'm saying this just to assume everyone knows those 2 tools. So basically black is Prettier for Python and flake8 is ESLint for Python. As simple as that for what it does, how to use it, how to configure it.
VScode setting was the only new thing here. Now I know that we can share configuration for VScode specific for different projects. And then can recommend extension for others. We all know how important extensions are when working with VScode.
The one problem I could not figure out was how to have scripts for black and flake8. If it was a JS projects, all I have to do is add a few lines to package.json -> "scripts". There is no such thing in Python, or I could not find it. I found something that might work which is using .sh files. But it doesn't work on Windows (I tried GIT bash on Windows too). So I feel kind of bad to work on Python right now :(

Top comments (0)