How important is enforcing Pythonic?
I had just delivered a product where the pipeline was broken into a few parts, then given to developers to work on due to the short timeline.
I finally had a chance to look at my colleague's code and was taken aback by how un-pythonic it is. Some of the main offenders include:
- not using "if __name__ == __main__"
- everything is in classes where most classes have only one function (no "init" function in it, if that matters)
- if it's a big class, the "main" function is really really really really long
- No comments, no tests but I suppose those can be attributed to rushing to deliver
I just don't know if I should care. I don't need to maintain his code because my pipeline starts from his program output. However, I feel uneasy at the fact that...it doesn't look like Python programming at all???
I guess I'm just confused. I'm not even sure if I'm ranting or asking for guidance. The code works so...should I even do anything?
Posted May 24, 2022, 11:49 PM UTC
Code reviews? Why is poor quality code being merged?
Theres plenty of things that can be automated eg precommit hookd, github actions for test coverage etc. Put in place proper processes to ensure poor code isnt merged
We're on separate team which code review is only done on my team.
Just joy of working with people with diverse background I suppose. I'm going to push for at least documentation and let the rest slide.