Closed v1a0 closed 3 years ago
In python UPPERCASE usually used for to highlight constants, but here I guess it might be reasonable to change args like "or", "set" to "OR" and "SET"
It's much easier to read and understand for person who ever used SQL-like databases
Here some examples:
BEFORE:
def insert_balance(user_id: int, balance: int): db.insert( table='coins', or_=REPLACE, id=user_id, balance=balance )
AFTER:
def insert_balance(user_id: int, balance: int): db.insert( OR=REPLACE, TABLE='coins', id=user_id, balance=balance )
def update_balance(user_id: int, balance: int): db.update( table='coins', set_={ 'balance': balance }, where={ 'id': user_id, } )
def update_balance(user_id: int, balance: int): db.update( TABLE='coins', SET={ 'balance': balance }, WHERE={ 'id': user_id, } )
SURE!!!! 🔥🔥🔥🔥
In python UPPERCASE usually used for to highlight constants, but here I guess it might be reasonable to change args like "or", "set" to "OR" and "SET"
It's much easier to read and understand for person who ever used SQL-like databases
Here some examples:
BEFORE:
AFTER:
BEFORE:
AFTER: