Considering moving this function (used by CodeTimeline and RepoStatistics) to its own module so other modules can access it:
def sanitize_filepath(self, filepath):
filepath = os.path.expanduser(filepath)
if os.path.isabs(filepath) == False:
filepath = os.path.join(os.getcwd(), filepath)
filepath = os.path.normpath(filepath)
return filepath
Don't forget to remove the self argument.