Skip to content

Cleaning up filepaths should be centralized #49

@briandk

Description

@briandk

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions