Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring rename rules for external modules #440

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

emdoyle
Copy link
Member

@emdoyle emdoyle commented Nov 26, 2024

Given cases like #414 , we cannot make the assumption that metadata resolution will always find the appropriate package for a module name.

This PR provides an 'escape hatch' in external.rename, a configured list of rename rules to fix external module resolution.

For example, if your code uses pillow through the PIL module, but check-external is failing to resolve this, you can add the following config to your tach.toml:

[external]
rename = ["PIL:pillow"]

In general, the rename field takes a list of strings in the format [module name]:[package name].

@emdoyle emdoyle merged commit 14bf3f6 into main Nov 26, 2024
7 checks passed
@emdoyle emdoyle deleted the allow-external-dep-rename-config branch November 26, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant