morelists 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- morelists/__init__.py +8 -8
- {morelists-0.1.5.dist-info → morelists-0.1.6.dist-info}/METADATA +1 -1
- morelists-0.1.6.dist-info/RECORD +6 -0
- morelists-0.1.5.dist-info/RECORD +0 -6
- {morelists-0.1.5.dist-info → morelists-0.1.6.dist-info}/WHEEL +0 -0
- {morelists-0.1.5.dist-info → morelists-0.1.6.dist-info}/licenses/LICENSE +0 -0
- {morelists-0.1.5.dist-info → morelists-0.1.6.dist-info}/top_level.txt +0 -0
morelists/__init__.py
CHANGED
@@ -79,7 +79,7 @@ class GameList():
|
|
79
79
|
|
80
80
|
if not immortal:
|
81
81
|
self.expirationList[expires] = self.list[expires]
|
82
|
-
self.flippedList[json.dumps(self.list[expires]
|
82
|
+
self.flippedList[json.dumps(self.list[expires])] = expires
|
83
83
|
|
84
84
|
if item["type"] == "add":
|
85
85
|
self.addValue += item["value"]
|
@@ -108,7 +108,7 @@ class GameList():
|
|
108
108
|
self.list[expires] = item
|
109
109
|
if not immortal:
|
110
110
|
self.expirationList[expires] = self.list[expires]
|
111
|
-
self.flippedList[json.dumps(item
|
111
|
+
self.flippedList[json.dumps(item)] = expires
|
112
112
|
|
113
113
|
if item["type"] == "add":
|
114
114
|
self.addValue += item["value"]
|
@@ -169,7 +169,7 @@ class GameList():
|
|
169
169
|
else:
|
170
170
|
self.divideValue -= (self.list[expiration]["value"] - 1)
|
171
171
|
|
172
|
-
del self.flippedList[json.dumps(self.list[expiration]
|
172
|
+
del self.flippedList[json.dumps(self.list[expiration])]
|
173
173
|
del self.list[expiration]
|
174
174
|
del self.expirationList[expiration]
|
175
175
|
|
@@ -255,7 +255,7 @@ class GameList():
|
|
255
255
|
pops = [(key, value) for key, value in self.list.items() if value["name"] == name]
|
256
256
|
pops.sort(key=lambda a: a[0])
|
257
257
|
if pops:
|
258
|
-
stringedList = json.dumps(pops[0][1]
|
258
|
+
stringedList = json.dumps(pops[0][1])
|
259
259
|
|
260
260
|
item = self.list[self.flippedList[stringedList]]
|
261
261
|
del self.list[self.flippedList[stringedList]]
|
@@ -283,7 +283,7 @@ class GameList():
|
|
283
283
|
perf_counter = time.time()
|
284
284
|
pops = [value for value in self.list.values() if value["name"] == name]
|
285
285
|
if pops:
|
286
|
-
stringedList = json.dumps(pops[0]
|
286
|
+
stringedList = json.dumps(pops[0])
|
287
287
|
|
288
288
|
item = self.list[self.flippedList[stringedList]]
|
289
289
|
del self.list[self.flippedList[stringedList]]
|
@@ -312,7 +312,7 @@ class GameList():
|
|
312
312
|
pops = [value for value in self.list.values() if value["name"] == name]
|
313
313
|
if pops:
|
314
314
|
for x in range(len(pops)):
|
315
|
-
stringedList = json.dumps(pops[x]
|
315
|
+
stringedList = json.dumps(pops[x])
|
316
316
|
|
317
317
|
|
318
318
|
item = self.list[self.flippedList[stringedList]]
|
@@ -339,7 +339,7 @@ class GameList():
|
|
339
339
|
name -- the name you gave the item(s) in the list
|
340
340
|
"""
|
341
341
|
perf_counter = time.time()
|
342
|
-
stringedList = json.dumps(item
|
342
|
+
stringedList = json.dumps(item)
|
343
343
|
if self.flippedList.get(stringedList, None):
|
344
344
|
del self.list[self.flippedList[stringedList]]
|
345
345
|
if self.flippedList[stringedList] in self.expirationList: del self.expirationList[self.flippedList[stringedList]]
|
@@ -367,7 +367,7 @@ class GameList():
|
|
367
367
|
"""
|
368
368
|
perf_counter = time.time()
|
369
369
|
if item in self.list.values():
|
370
|
-
stringedList = json.dumps(item
|
370
|
+
stringedList = json.dumps(item)
|
371
371
|
del self.list[dict(self.flippedList[stringedList])]
|
372
372
|
if dict(self.flippedList[stringedList]) in self.expirationList: del self.expirationList[dict(self.flippedList[stringedList])]
|
373
373
|
del self.flippedList[stringedList]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: morelists
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
4
4
|
Summary: A small and easy list you can add together like a math equation and has a expiration date for items. Mostly useful for games with stats from multiple sources. More lists will come soon.
|
5
5
|
Home-page: https://github.com/EmanuelNorsk/enlist
|
6
6
|
Author: Emanuel Odén Hesselroth
|
@@ -0,0 +1,6 @@
|
|
1
|
+
morelists/__init__.py,sha256=Huivier40-MDWRl6Z5KUW4wpitVbEnRQxP1eU6XyKXI,17066
|
2
|
+
morelists-0.1.6.dist-info/licenses/LICENSE,sha256=-ASFHlrne1rk8zV57Qj01X2JB-D67ZHPMv1PtQhrbN8,32
|
3
|
+
morelists-0.1.6.dist-info/METADATA,sha256=EENJoIr31AYnyAUDbglTcVyUFOBnxScNSoWjJql5LDc,681
|
4
|
+
morelists-0.1.6.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
5
|
+
morelists-0.1.6.dist-info/top_level.txt,sha256=Zd7NosYzor-RcH_aD86FXJa3fQzWunYA4_FQS3Yodqo,10
|
6
|
+
morelists-0.1.6.dist-info/RECORD,,
|
morelists-0.1.5.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
morelists/__init__.py,sha256=8cQ05qmXnIZry3FEjZBb25oMys2j8cppzZcBDVSt6vU,17194
|
2
|
-
morelists-0.1.5.dist-info/licenses/LICENSE,sha256=-ASFHlrne1rk8zV57Qj01X2JB-D67ZHPMv1PtQhrbN8,32
|
3
|
-
morelists-0.1.5.dist-info/METADATA,sha256=k2gE6ZPEKVLTGh4tTu4xXQtKFilU6e8F5EHD6wHWT-o,681
|
4
|
-
morelists-0.1.5.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
5
|
-
morelists-0.1.5.dist-info/top_level.txt,sha256=Zd7NosYzor-RcH_aD86FXJa3fQzWunYA4_FQS3Yodqo,10
|
6
|
-
morelists-0.1.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|