Skip to content

Commit 3009353

Browse files
committed
Clean up some more code
1 parent ceb77b8 commit 3009353

4 files changed

Lines changed: 5 additions & 10 deletions

File tree

cloudbot/util/filesize.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
]
100100

101101

102-
def size(bytes, system=traditional):
102+
def size(b, system=traditional):
103103
"""Human-readable file size.
104104
105105
Using the traditional system, where a factor of 1024 is used::
@@ -150,9 +150,9 @@ def size(bytes, system=traditional):
150150
151151
"""
152152
for factor, suffix in system:
153-
if bytes >= factor:
153+
if b >= factor:
154154
break
155-
amount = int(bytes / factor)
155+
amount = int(b / factor)
156156
if isinstance(suffix, tuple):
157157
singular, multiple = suffix
158158
if amount == 1:

plugins/system.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
@hook.command(autohelp=False)
1414
def about(text, conn):
15-
"""-- Gives information about CloudBot. Use .about license for licensing information
16-
:type event: cloudbot.event.Event
17-
"""
15+
"""-- Gives information about CloudBot. Use .about license for licensing information"""
1816
if text.lower() in ("license", "gpl", "source"):
1917
return "CloudBot Refresh is released under the GPL v3 license, get the source code " \
2018
"at https://github.com/CloudBotIRC/CloudBot/"

plugins/whois.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import pythonwhois
22

3-
from pprint import pprint
4-
53
from cloudbot import hook
64

75

plugins/youtube.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import re
22
import time
3-
import isodate
43

5-
import bs4
4+
import isodate
65
import requests
76

87
from cloudbot import hook

0 commit comments

Comments
 (0)