Closed rasmunk closed 4 years ago
https://github.com/rasmunk/docker-migrid/blob/9b8b092f1eb1d7117088a19fe8e0a48bd740fcd4/mig/shared/pattern.py#L70
As per https://www.python.org/dev/peps/pep-0008/
For sequences, (strings, lists, tuples), use the fact that empty sequences are false. ` Yes: if not seq: if seq: No: if len(seq): if not len(seq):`
For sequences, (strings, lists, tuples), use the fact that empty sequences are false.
` Yes: if not seq: if seq:
No: if len(seq): if not len(seq):`
You can improve both L70 and L57 with:
`if not self.trigger_paths:
....
`
As per the refactor this is no longer an issue
https://github.com/rasmunk/docker-migrid/blob/9b8b092f1eb1d7117088a19fe8e0a48bd740fcd4/mig/shared/pattern.py#L70
As per https://www.python.org/dev/peps/pep-0008/
You can improve both L70 and L57 with:
`if not self.trigger_paths:
`