Remove unused imports.
Add option to only generate cache database.
Triple period is more readable than ellipsis in terminals.
Just a bunch of whitespace fixes.
This is more than twice faster, says cProfiler.
List comprehension more readable here IMO, and does not impact speed or behavior.
Less indentation.