morelists 0.1.4__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 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], sort_keys=True)] = 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, sort_keys=True)] = expires
111
+ self.flippedList[json.dumps(item)] = expires
112
112
 
113
113
  if item["type"] == "add":
114
114
  self.addValue += item["value"]
@@ -169,8 +169,9 @@ 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], sort_keys=True)]
172
+ del self.flippedList[json.dumps(self.list[expiration])]
173
173
  del self.list[expiration]
174
+ del self.expirationList[expiration]
174
175
 
175
176
  object.__getattribute__(self, "history").append((expiration, self.list, self.expirationList, self.flippedList, self.safeSum()))
176
177
  expiration = min(self.expirationList.keys())
@@ -254,7 +255,7 @@ class GameList():
254
255
  pops = [(key, value) for key, value in self.list.items() if value["name"] == name]
255
256
  pops.sort(key=lambda a: a[0])
256
257
  if pops:
257
- stringedList = json.dumps(pops[0][1], sort_keys=True)
258
+ stringedList = json.dumps(pops[0][1])
258
259
 
259
260
  item = self.list[self.flippedList[stringedList]]
260
261
  del self.list[self.flippedList[stringedList]]
@@ -282,7 +283,7 @@ class GameList():
282
283
  perf_counter = time.time()
283
284
  pops = [value for value in self.list.values() if value["name"] == name]
284
285
  if pops:
285
- stringedList = json.dumps(pops[0], sort_keys=True)
286
+ stringedList = json.dumps(pops[0])
286
287
 
287
288
  item = self.list[self.flippedList[stringedList]]
288
289
  del self.list[self.flippedList[stringedList]]
@@ -311,7 +312,7 @@ class GameList():
311
312
  pops = [value for value in self.list.values() if value["name"] == name]
312
313
  if pops:
313
314
  for x in range(len(pops)):
314
- stringedList = json.dumps(pops[x], sort_keys=True)
315
+ stringedList = json.dumps(pops[x])
315
316
 
316
317
 
317
318
  item = self.list[self.flippedList[stringedList]]
@@ -338,7 +339,7 @@ class GameList():
338
339
  name -- the name you gave the item(s) in the list
339
340
  """
340
341
  perf_counter = time.time()
341
- stringedList = json.dumps(item, sort_keys=True)
342
+ stringedList = json.dumps(item)
342
343
  if self.flippedList.get(stringedList, None):
343
344
  del self.list[self.flippedList[stringedList]]
344
345
  if self.flippedList[stringedList] in self.expirationList: del self.expirationList[self.flippedList[stringedList]]
@@ -366,7 +367,7 @@ class GameList():
366
367
  """
367
368
  perf_counter = time.time()
368
369
  if item in self.list.values():
369
- stringedList = json.dumps(item, sort_keys=True)
370
+ stringedList = json.dumps(item)
370
371
  del self.list[dict(self.flippedList[stringedList])]
371
372
  if dict(self.flippedList[stringedList]) in self.expirationList: del self.expirationList[dict(self.flippedList[stringedList])]
372
373
  del self.flippedList[stringedList]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: morelists
3
- Version: 0.1.4
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,,
@@ -1,6 +0,0 @@
1
- morelists/__init__.py,sha256=xaG9UmUJZSJOXVVopdapxuVnoQMEodogsxL4CVGxUH0,17141
2
- morelists-0.1.4.dist-info/licenses/LICENSE,sha256=-ASFHlrne1rk8zV57Qj01X2JB-D67ZHPMv1PtQhrbN8,32
3
- morelists-0.1.4.dist-info/METADATA,sha256=esNBC76o8KCXTmn9vNKxcaGAGn1J9VNsPM9mbCwy74Q,681
4
- morelists-0.1.4.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
5
- morelists-0.1.4.dist-info/top_level.txt,sha256=Zd7NosYzor-RcH_aD86FXJa3fQzWunYA4_FQS3Yodqo,10
6
- morelists-0.1.4.dist-info/RECORD,,