jbesomi / texthero

Text preprocessing, representation and visualization from zero to hero.
https://texthero.org
MIT License
2.88k stars 239 forks source link

introducing flake8 to Texthero #159

Open mk2510 opened 4 years ago

mk2510 commented 4 years ago

I was thinking, that we could improve our overall code quality by using some checker or style guide tools like flake8. From my previous experiences, Uni and Work it was a huge benefit 🚀 :octocat:

jbesomi commented 4 years ago

We are already using black, right? As far as I can tell there is no benefit of running flake8 on top of black, I'm missing something?

mk2510 commented 4 years ago

I got this idea from this post. Flake8 is basically a code linter, which will do some basic static checks. This will help us to prevent basic bugs, like using a variable before it was assigned, etc... . This is especially helpful as python is an interpreted language and in the worst case, some code lines aren't executed with our tests but by some users the first time.

It also should be a bit stricter by coding guidelines so we have a uniformer coding style.

Black won't do those things, but just formats the code right.

jbesomi commented 3 years ago

Hey @mk2510, have you ever used flake8 before? It would be great to test it on the current codebase and see how many advices it provides. Would you mind try it and let us know?

mk2510 commented 3 years ago

Hej @jbesomi I used style guides in other projects and languages before. As I am running short on time this July, as my BT takes more time than expected I will have the time again in August to do those tests. 😇 :octocat:

jbesomi commented 3 years ago

Ok, let's talk soon! Thanks, and good luck with your BT!