def _skip_file_path(sf):
    """Returns the path used for a skipped file.

    If a skipped file has a target path, it's used as the path,
    otherwise the file run path is used. A skipped file does not have
    a target path when it does not originate from a project
    directory. This may be because it's a resolved dependency source
    from a remote file or from an unpacked archive.
    """
    return sf.target_path or sf.run_path