Skip to content

Commit a4f5c08

Browse files
committed
pep8 cleanup for halal.py
1 parent 194f1e1 commit a4f5c08

1 file changed

Lines changed: 87 additions & 84 deletions

File tree

plugins/halal.py

Lines changed: 87 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,105 @@
1-
#halaal for gonzobot
1+
# halaal for gonzobot
22
import random
3-
from cloudbot import hook
43

4+
from cloudbot import hook
55

6-
quantity = ['a little bit of',
7-
'a heaping pile of',
8-
'a moderate serving of',
9-
'a taste of',
10-
'just a smell of',
11-
]
6+
quantity = [
7+
'a little bit of',
8+
'a heaping pile of',
9+
'a moderate serving of',
10+
'a taste of',
11+
'just a smell of',
12+
]
1213

14+
quality = [
15+
'fresh made',
16+
'left over',
17+
'just out of the oven'
1318

14-
quality = [ 'fresh made',
15-
'left over',
16-
'just out of the oven'
19+
]
1720

18-
]
21+
dish = [
22+
'Rice and Goat Meat',
23+
'Goat Curry',
24+
'Hummus bi Tahina',
25+
'Läghmän',
26+
'Mutton biryani',
27+
'Kabuli palao',
28+
'Shakshouka',
29+
'Mutton Msala',
30+
'Fatteh Betnjan',
31+
'Caprese stuffed chicken breast',
32+
'Maqloobeh',
33+
'Koofteh berenji',
34+
'Fish Makkanwala',
35+
'Szechwan'
36+
]
1937

20-
dish = [ 'Rice and Goat Meat',
21-
'Goat Curry',
22-
'Hummus bi Tahina',
23-
'Läghmän',
24-
'Mutton biryani',
25-
'Kabuli palao',
26-
'Shakshouka',
27-
'Mutton Msala',
28-
'Fatteh Betnjan',
29-
'Caprese stuffed chicken breast',
30-
'Maqloobeh',
31-
'Koofteh berenji',
32-
'Fish Makkanwala',
33-
'Szechwan'
34-
]
35-
kdish = ['gefilte fish',
36-
'matzo ball soup',
37-
'cholent',
38-
'sufganiyot',
39-
'cream cheese with lox bagel',
40-
'lamb merguez with lentils and pears',
41-
'warm apple streusel with ice cream on top',
42-
'mushroom and truffle pizza',
43-
'lemon and rosemary salad with a side of rice',
44-
'latkes with applesauce',
45-
'challah french toast',
46-
'grilled fish tacos with chili-lime dressing',
47-
'date charoset',
48-
'huevos haminados',
49-
'baba-ghanouj',
50-
'bastani with freshly baked pita',
51-
'hummus with perfectly fried falafel',
52-
'mujadrah with warm bread',
53-
'shishlik with red peppers, mushrooms, and onion',
54-
'spicy shakshouka with french bread',
55-
'hadgi badah with a tall glass of apple juice',
56-
'malawah with a large glass of milk',
57-
'sweet kugel with extra sugar on top',
58-
'hamantaschen with date and raspberry filling',
59-
'marbled halva with almonds on top',
60-
'labna with a side of chili sauce',
61-
'polow shirin with extra pomegranate',
62-
'lamb bademjan'
63-
'beef kubbeh with extra chili peppers',
64-
'beef shawarma with a side of hummus and rice',
65-
'lamb and mushroom kofta with a large coke',
66-
'cheese and spinach sambousek',
67-
'bamieh with a side of grilled chicken',
68-
'chicken tagine with saffron rice and a slice of lechuch',
69-
'kofta mishmisheya with grilled vegetables',
70-
'charoset with day old matzah',
71-
'sour cherry rugelach',
72-
'orange-scented flan with dulce de leche syrup',
73-
'brisket with potatoes and a spinach salad',
74-
'bouikos con kashkaval',
75-
'lemon-rice soup with soda crackers'
76-
]
38+
kdish = [
39+
'gefilte fish',
40+
'matzo ball soup',
41+
'cholent',
42+
'sufganiyot',
43+
'cream cheese with lox bagel',
44+
'lamb merguez with lentils and pears',
45+
'warm apple streusel with ice cream on top',
46+
'mushroom and truffle pizza',
47+
'lemon and rosemary salad with a side of rice',
48+
'latkes with applesauce',
49+
'challah french toast',
50+
'grilled fish tacos with chili-lime dressing',
51+
'date charoset',
52+
'huevos haminados',
53+
'baba-ghanouj',
54+
'bastani with freshly baked pita',
55+
'hummus with perfectly fried falafel',
56+
'mujadrah with warm bread',
57+
'shishlik with red peppers, mushrooms, and onion',
58+
'spicy shakshouka with french bread',
59+
'hadgi badah with a tall glass of apple juice',
60+
'malawah with a large glass of milk',
61+
'sweet kugel with extra sugar on top',
62+
'hamantaschen with date and raspberry filling',
63+
'marbled halva with almonds on top',
64+
'labna with a side of chili sauce',
65+
'polow shirin with extra pomegranate',
66+
'lamb bademjan'
67+
'beef kubbeh with extra chili peppers',
68+
'beef shawarma with a side of hummus and rice',
69+
'lamb and mushroom kofta with a large coke',
70+
'cheese and spinach sambousek',
71+
'bamieh with a side of grilled chicken',
72+
'chicken tagine with saffron rice and a slice of lechuch',
73+
'kofta mishmisheya with grilled vegetables',
74+
'charoset with day old matzah',
75+
'sour cherry rugelach',
76+
'orange-scented flan with dulce de leche syrup',
77+
'brisket with potatoes and a spinach salad',
78+
'bouikos con kashkaval',
79+
'lemon-rice soup with soda crackers'
80+
]
7781

7882

83+
@hook.command('halaal', 'halal', autohelp=False)
84+
def serving(text, action):
85+
"""Serves halaal dishes to some one in the channel"""
86+
diner = text.strip()
7987

80-
@hook.command('halaal', 'halal', autohelp = False)
81-
def serving(text, action):
82-
'''Serves halaal dishes to some one in the channel'''
83-
diner = text.strip()
88+
if diner == '':
89+
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(dish)))
8490

85-
if diner =='':
86-
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(dish)))
91+
else:
92+
action('Serves {} {} {} {}'.format(diner, random.choice(quantity), random.choice(quality), random.choice(dish)))
8793

88-
else:
89-
action('Serves {} {} {} {}'.format(diner, random.choice(quantity), random.choice(quality), random.choice(dish)))
9094

9195
@hook.command('kosher', autohelp=False)
9296
def kserving(text, action):
93-
94-
'''Servers a Kosher dish to some one in the channel. Part of halal.py. Made with help of snoonet user Yat'''
97+
"""Servers a Kosher dish to some one in the channel. Part of halal.py. Made with help of snoonet user Yat"""
9598
kdiner = text.strip()
96-
if kdiner =='':
97-
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(kdish)))
99+
if kdiner == '':
100+
action('has {} {} {}'.format(random.choice(quantity), random.choice(quality), random.choice(kdish)))
98101
else:
99-
action('Serves {} {} {} {}'.format(kdiner, random.choice(quantity), random.choice(quality), random.choice(kdish)))
102+
action('Serves {} {} {} {}'.format(kdiner, random.choice(quantity), random.choice(quality), random.choice(kdish)))
100103

101-
#written by ilgnome
102-
#find me in #gonzobot
104+
# written by ilgnome
105+
# find me in #gonzobot

0 commit comments

Comments
 (0)