Skip to content

Inconsistent Path Processing #1367

@AryazE

Description

@AryazE

The paths argument in FullRepoManager supposedly take a collection of paths relative to the repo_root_dir, however, when using the FullyQualifiedNameProvider, the gen_cache function calls the libcst.helpers.module.calculate_module_and_package, which then calls relative_to function on the already relative paths. This raises the ValueError saying that path X is not a subpath of path Y.
I have checked and the only two places this helper function is used are in the context of FullRepoManager, so I think it would be safe to remove the relative_to in libcst.helpers.module.calculate_module_and_package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions