duplicate entries in `regex.json`
jyooru opened this issue · comments
Describe the bug
There are some duplicate entries in regex.json
:
To Reproduce
Steps to reproduce the behavior:
from pywhat.helper import read_json
database = read_json("regex.json")
regexes = [regex["Name"] for regex in database]
duplicates = set([regex for regex in regexes if regexes.count(regex) > 1])
print(duplicates)
Expected behavior
A clear and concise description of what you expected to happen.
N/A
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
none
We should turn this into a test! 🥳
I could make this into a test! The majority of the work is already done in the To Reproduce
section. But which of the duplicate tests should get removed?
I could make this into a test! The majority of the work is already done in the
To Reproduce
section. But which of the duplicate tests should get removed?
If they are duplicates, remove a random one :) It doesn't matter which one if they are the same! :D