fix info.py

This commit is contained in:
Nexus 2023-05-05 00:11:29 +01:00
parent 7c791153f8
commit 551e858dcd
3 changed files with 7 additions and 6 deletions

View file

@ -14,8 +14,8 @@ try:
import fanshim
import apa102
import RPi.GPIO as GPIO
except (ImportError, AttributeError):
fanshim = GPIO = None
except ImportError:
fanshim = GPIO = apa102 = None
class InfoCog(commands.Cog):
@ -28,6 +28,7 @@ class InfoCog(commands.Cog):
"SENSORS": "\N{thermometer}",
"UPTIME": "\N{alarm clock}",
}
def __init__(self, bot):
self.bot = bot
@ -182,7 +183,7 @@ class InfoCog(commands.Cog):
embed.add_field(
name=f"{self.EMOJIS['NETWORK']} Network",
value=f"**Sent:** {humanize.naturalsize(network.bytes_sent, binary=binary)}\n"
f"**Received:** {humanize.naturalsize(network.bytes_recv, binary=binary)}",
f"**Received:** {humanize.naturalsize(network.bytes_recv, binary=binary)}",
inline=False,
)
embed.add_field(

View file

@ -1,3 +1,3 @@
[pycodestyle]
max-line-length = 120
ignore = W293
ignore = W293,W291