bee-san / pyWhat

🐸 Identify anything. pyWhat easily lets you identify emails, IP addresses, and more. Feed it a .pcap file or some text and it'll tell you what it is! 🧙‍♀️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duplicate entries in `regex.json`

jyooru opened this issue · comments

commented

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