Skip to content

Commit 6d6f4a7

Browse files
authored
Merge pull request CloudBotIRC#120 from linuxdaemon/import-cleanup
Removed unused imports in various plugins
2 parents 4e63489 + be5da93 commit 6d6f4a7

26 files changed

Lines changed: 16 additions & 43 deletions

plugins/bible.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import requests
2-
import re
32

43
from cloudbot import hook
54

plugins/clinton.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import codecs
22
import json
33
import os
4-
import random
54
import asyncio
65

76
from cloudbot import hook

plugins/dig.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import requests
2-
import json
32

43
from cloudbot import hook
54

plugins/duckhunt.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import random
2-
import re
32
import operator
43

54
from time import time
@@ -246,7 +245,7 @@ def bang(nick, chan, message, db, conn, notice):
246245
conn.send(out)
247246
return
248247
return "There is no duck. What are you shooting at?"
249-
else:
248+
else:
250249
game_status[network][chan]['shoot_time'] = time()
251250
deploy = game_status[network][chan]['duck_time']
252251
shoot = game_status[network][chan]['shoot_time']
@@ -257,7 +256,7 @@ def bang(nick, chan, message, db, conn, notice):
257256
chance = hit_or_miss(deploy, shoot)
258257
if not random.random() <= chance and chance > .05:
259258
out = random.choice(miss) + " You can try again in 7 seconds."
260-
scripters[nick.lower()] = shoot + 7
259+
scripters[nick.lower()] = shoot + 7
261260
return out
262261
if chance == .05:
263262
out += "You pulled the trigger in {} seconds, that's mighty fast. Are you sure you aren't a script? Take a 2 hour cool down.".format(str(shoot - deploy))
@@ -359,7 +358,7 @@ def friends(text, chan, conn, db):
359358
scores = db.execute(select([table.c.name, table.c.befriend]) \
360359
.where(table.c.network == conn.name) \
361360
.order_by(desc(table.c.befriend)))
362-
if scores:
361+
if scores:
363362
for row in scores:
364363
if row[1] == 0:
365364
continue

plugins/etymology.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Plugin by GhettoWizard and Scaevolus
22

3-
import re
43
from lxml import html
54

65
import requests

plugins/fact.py

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

33
from cloudbot import hook
4-
from cloudbot.util import http, web
4+
from cloudbot.util import http
55

66
types=['trivia', 'math', 'date', 'year']
77

@@ -20,4 +20,4 @@ def fact():
2020
attempts += 1
2121
continue
2222
response = json['text']
23-
return response
23+
return response

plugins/factoids.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from sqlalchemy import Table, Column, String, PrimaryKeyConstraint
55
from collections import defaultdict
6-
import requests
76

87
from cloudbot import hook
98
from cloudbot.util import database, colors, web

plugins/fmk.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import codecs
22
import os
33
import random
4-
import re
54

65
from cloudbot import hook
76

plugins/grab.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import re
21
import random
32

43
from collections import defaultdict
5-
from sqlalchemy import Table, Column, String, Boolean, DateTime
6-
from sqlalchemy.sql import select
4+
from sqlalchemy import Table, Column, String
75
from cloudbot import hook
86
from cloudbot.util import database
97

plugins/help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55

66
from cloudbot import hook
7-
from cloudbot.util import formatting, web
7+
from cloudbot.util import formatting
88

99

1010
@asyncio.coroutine

0 commit comments

Comments
 (0)