Skip to content

Colors DATs without External File par #29

@chrsmlls333

Description

@chrsmlls333

This Tox is a lifesaver, but the current version is a bit overzealous with coloring DATs. I found that it looks for if any DAT's 'file' parameter doesn't equal an empty string, then its added to the collection of "externalized" DATs. But all DATs without a file parameter at all would fail that test.

I adjusted to the following and it worked for me. Was the exclude list to prevent this from happening?

def find_all_dats(self):
		external_dats = []
		exclude_list = [
			'eval', 
			'keyboardin', 
			'opfind', 
			'folder', 
			'examine', 
			'select',
			'udpout',
			'udpin',
			'script',
			'null',
			'info']
		for eachOp in root.findChildren(type=DAT):
			if eachOp.type in exclude_list:
				pass
			
			else:
				filepar = eachOp.par['file']
				if filepar is not None and filepar.valid:
					if filepar != '':
						external_dats.append(eachOp)
				else:
					pass
		return external_dats

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions