mmk150 / reminder_bot

Discord.py reminderbot
2 stars 1 forks source link

Recommendation: Code formatter #2

Open Luunae opened 1 year ago

Luunae commented 1 year ago

Something opinionated that you wouldn't particularly mind following. Can be set up to run on file save, depending on your dev environment.

Would clear up code like this bit from /src/thoth/commandio.py:

def reminder(message_frag,user: discord.User,req_time: datetime.datetime ,channel: discord.TextChannel.id ,del_code,badgermode):

to something like...

def reminder(message_frag, user: discord.User, req_time: datetime.datetime, channel: discord.TextChannel.id, del_code,badgermode):

Or maybe something like...

def reminder(message_frag,
             user: discord.User,
             req_time: datetime.datetime,
             channel: discord.TextChannel.id,
             del_code,
             badgermode):

Or a handful of other slight variations. Just, something to avoid the random inconsistencies might be nice.

I'm familiar with Black for Python, although @LunNova might have knowledge of other options if it turns out you don't like that one. Whichever one, can make it a requirement in pyproject.toml so everyone should be on the same page.

LunNova commented 1 year ago

blue's like black except it follows all PEP 8 requirements so I prefer it since finding it.