Menu

1 / 2

The lazy developer's code quality

DEV Community·Alessandra Bilardi·6 months ago
#Z3bzpwFe
#ruff#pylint#pytest#type#article
Reading 0:00
15s threshold

A repo to refresh, several rabbit holes to dive into

A while ago, at PyCon IT, I attended a talk that opened my eyes on pytest :

simpler test management, especially for mocks

parametrizable fixtures instead of the setUp / tearDown ritual

bare assert instead of a thousand self.assertEqual

I'd like my repo python-prototype , born for educational purposes, to also be a bit of a template I can pull off the shelf for the next projects.

So, with the excuse of refreshing the testing system with pytest and the packaging with pyproject , I started thinking about adding more.

I had been using black and pylint for a long time, so my first thought was: ok, let's bring in formatting and linting too. But I asked myself: isn't there something better that maintains style ( PEP 8 ), docstrings ( PEP 257 ) and type hints ( PEP 484 ) automatically ?

And the environment, can it be modernized too ? With what ? Well, just like there are two schools, emacs and vi, there are also two schools, poetry and uv ..…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.