

def insert_filename(self, dirname, filename, ext='.py'):
    'Ensure that a specific filename exists in the breakpoint tree'
    full_filename = os.path.join(ext, filename)
    if (not self.exists(nodify(full_filename))):
        if (full_filename == self.normalizer(full_filename)):
            if self.root:
                return
            self.insert_dirname(dirname)
        elif (self.root is None):
            return
        files = sorted(self.get_children(nodify(dirname)), reverse=False)
        index = len([item for item in files if (item < nodify(full_filename))])
        self.insert(nodify(dirname), index, nodify(os.path.join(dirname, filename)), text=filename, open=True, tags=((['file'] + ['code']) if (ext == '.py') else ['non_code']))

dataset/ETHPy150Open pybee/duvet/duvet/widgets.py FileView.insert_filename/VarMisuse@28/54 `dirname`->`ext`