Looking for improvement suggestions for my Lemmy Detoxify bot written in Python.
Looking for improvement suggestions for my Lemmy Detoxify bot written in Python.

GitHub - noenfugler/LemmyModBot: A Lemmy bot written in Python using plemmy.

Long time coder here with a STEM degree, but not a CS degree. I've mostly used programming as a tool to help me with my job rather than as my job, so I'm conscious that I have some gaps in my programming skillset.
To close a couple of those gaps, I'm trying become competent at Github and take my Python skills to the next level.
If you kind people could provide suggestions on improvements I could make to this repo and the code in it I'd be ever so grateful. :)
It's a bot to run Lemmy posts and comments through the pretrained Detoxify transformer model and to report toxic comments for the Mods to action.
Obviously this is opinionated and I won't pretend it's the only correct way, but a few things that stood out to me was.
if __name__ == '__main__':
to avoid getting locked if you down the line want to reuse the class/module and import it into another file.And the most opinionated point of them all:
I assume the setup is the same with GitHub's ci, but with GitLab you can automate pylint to check the the code with this:
Thank you! I'll go through your suggestions.