Remove commented code

This commit is contained in:
Luke Robles 2024-11-11 16:23:44 -08:00
parent 16451d1739
commit c2f41c76e6
2 changed files with 1 additions and 14 deletions

View File

@ -43,6 +43,7 @@ class Tarkov(commands.Cog):
if spawns_from_api != known_spawns: if spawns_from_api != known_spawns:
embed.set_author(name="🎲 Boss spawn chances have updated 🎲") embed.set_author(name="🎲 Boss spawn chances have updated 🎲")
# Send both dicts to this method to see if any spawn rates have been updated
changes_dict = tarkov.compare_boss_spawns(known_spawns, spawns_from_api) changes_dict = tarkov.compare_boss_spawns(known_spawns, spawns_from_api)
for level, boss in changes_dict.items(): for level, boss in changes_dict.items():

View File

@ -1,7 +1,6 @@
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
import requests import requests
import random import random
import json
def request_wiki(url, heading): def request_wiki(url, heading):
@ -88,19 +87,6 @@ def get_tarkov_boss_info():
def compare_boss_spawns(known_spawns: dict, spawns_from_api: dict) -> dict: def compare_boss_spawns(known_spawns: dict, spawns_from_api: dict) -> dict:
changes = {} # To store the changes changes = {} # To store the changes
# diff = DeepDiff(known_spawns, spawns_from_api, ignore_order=True, verbose_level=2)
# # Get the differences between the two JSON blobs
# # Iterate through the diff to find spawnChance differences
# for key, changes in diff.items():
# if key == 'values_changed':
# for path, change in changes.items():
# # Access the level and boss name directly from the path
# level, boss = path.split('[')[1].split(']')[0], path.split('[')[2].split(']')[0]
# # Print the relevant difference in spawnChance
# if 'new_value' in change:
# print(f"Level: {level}, Boss: {boss}, Diff in spawnChance: {change['old_value']} -> {change['new_value']}")
for level in known_spawns: for level in known_spawns:
level_changes = {} # Store changes for each level level_changes = {} # Store changes for each level
for boss in known_spawns.get(level, {}): for boss in known_spawns.get(level, {}):