DEV Community

Discussion on: Level Up Your Python Code Reviews

Collapse
 
sobolevn profile image
Nikita Sobolev

Great advice!

I would also love to share my personal favourite tool for Python code reviews. It is called wemake-python-styleguide. It is the strictest python linter out there. And it makes core reviews absolutely amazing!

First of all, it makes people to write consistent code. And by "consistent" I mean consistent! It tries to make code from different developers the same. Not just spaces and quotes, but hundreds of things.

Secondly, it allows to find common mistakes and enforces to follow the known best practices.

And last but not least, it takes care of proper naming. There are a lot of thing in this topic: meaningless names, too short or too long names, etc and etc.

There are also handy option to send inline PR reviews like so:

wemake-python-styleguide
Docs

I totally recommend to check it out.

GitHub logo wemake-services / wemake-python-styleguide

The strictest and most opinionated python linter ever!

wemake-python-styleguide

wemake.services Supporters Build Status codecov Python Version wemake-python-styleguide


Welcome to the strictest and most opinionated python linter ever.

wemake-python-styleguide logo

wemake-python-styleguide is actually a flake8 plugin with some other plugins as dependencies.

Quickstart

pip install wemake-python-styleguide

You will also need to create a setup.cfg file with the configuration.

We highly recommend to also use:

  • flakehell for easy integration into a legacy codebase
  • nitpick for sharing and validating configuration across multiple projects

Running

flake8 your_module.py

This app is still just good old flake8 And it won't change your existing workflow.

invocation resuts

See "Usage" section in the docs for examples and integrations.

We also support Github Actions as first class-citizens Try it out!

What we are about

The ultimate goal of this project is to make all people write exactly the same python code.

flake8 pylint black mypy wemake-python-styleguide
Formats code?
Finds style issues? 🤔 🤔
Finds bugs? 🤔
Collapse
 
billah_tishad profile image
Modasser Billah

Looks great, I'll check it out!