if
expression used can be simplified PYL-R1719 86 token = jwt.encode(
87 {
88 "user_id": user.id,
89 "is_sys_admin": True if user.sys_admin else False, 90 "exp": datetime.now().timestamp() + 86400,
91 },
92 f.read(),
The if
expression used here can be simplified to increase the code readability.
Example:
value = True if arg else False
This can be simplified into:
value = bool(arg)