Not sure how useful this would be broadly, but in my case I find it useful to apply chain.from_iterable to remove nesting in the code. Roughly:
for change_type, change_path in chain.from_iterable(watch(some_path)):
...
It would be nice if watch had a kwarg, e.g. unpack: bool, where setting it to True would yield FileChange (rather than set[FileChange]).
Not sure how useful this would be broadly, but in my case I find it useful to apply
chain.from_iterableto remove nesting in the code. Roughly:It would be nice if
watchhad a kwarg, e.g.unpack: bool, where setting it toTruewould yieldFileChange(rather thanset[FileChange]).