<commit_before>import rexviewer as r
from PythonQt.QtGui import QLineEdit

PRIMTYPES_REVERSED = {
    "Material": "45",
    "Wav": "17",
    "Ogg": "1",
    "Texture": "0"
}

class DragDroppableEditline(QLineEdit):
    def __init__(self, mainedit, *args):
        self.mainedit = mainedit #to be able to query the selected entity at drop
        QLineEdit.__init__(self, *args)
        self.old_text = ""
        
        self.combobox = None #throw into another class...
        self.buttons = []
        self.spinners = []
        self.index = None 

    def accept(self, ev):
        return ev.mimeData().hasFormat("application/vnd.inventory.item")
    #XXX shouldn't accept any items, but just the right asset types
    #or better yet: accept drop to anywhere in the window and 
    #determine what to do based on the type?

    def dragEnterEvent(self, ev):
        if self.accept(ev):
            ev.acceptProposedAction()

    def dragMoveEvent(self, ev):
        if self.accept(ev):
            ev.acceptProposedAction()

    def dropEvent(self, ev):<commit_msg>Accidently left these audio bits when I was learning this part of the code. Showed up in materials dropbox, but didn't realize that (since I didn't look at those ;)<commit_after>import rexviewer as r
from PythonQt.QtGui import QLineEdit

PRIMTYPES_REVERSED = {
    "Material": "45",
    "Texture": "0"
}

class DragDroppableEditline(QLineEdit):
    def __init__(self, mainedit, *args):
        self.mainedit = mainedit #to be able to query the selected entity at drop
        QLineEdit.__init__(self, *args)
        self.old_text = ""
        
        self.combobox = None #throw into another class...
        self.buttons = []
        self.spinners = []
        self.index = None 

    def accept(self, ev):
        return ev.mimeData().hasFormat("application/vnd.inventory.item")
    #XXX shouldn't accept any items, but just the right asset types
    #or better yet: accept drop to anywhere in the window and 
    #determine what to do based on the type?

    def dragEnterEvent(self, ev):
        if self.accept(ev):
            ev.acceptProposedAction()

    def dragMoveEvent(self, ev):
        if self.accept(ev):
            ev.acceptProposedAction()

    def dropEvent(self, ev):
{'fraction_non_alphanumeric': 0.09964570416297608, 'fraction_numerical': 0.003985828166519044, 'mean_word_length': 2.6731707317073172, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5504492', 'n_tokens_mistral': 703, 'n_tokens_neox': 675, 'n_words': 220}