Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors DATs without External File par #29

Open
chrsmlls333 opened this issue Jun 10, 2024 · 0 comments
Open

Colors DATs without External File par #29

chrsmlls333 opened this issue Jun 10, 2024 · 0 comments

Comments

@chrsmlls333
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant