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

Add support for generated files with custom imports #40

Conversation

keith
Copy link
Contributor

@keith keith commented Nov 15, 2024

If the source files of a py_library are generated, and the library has
custom imports, we need to add both the imports path and the generated
dir's relative import path to the MYPYPATH

If the source files of a py_library are generated, and the library has
custom `imports`, we need to add both the imports path and the generated
dir's relative import path to the MYPYPATH
@keith keith requested a review from a team as a code owner November 15, 2024 00:09
generated_custom_imports = []
for generated_dir in unique_generated_dirs:
for custom_import in custom_imports:
generated_custom_imports.append("{}/{}".format(generated_dir, custom_import))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess some of these may just not exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. I figured that shouldn't hurt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to roll with it -- only a mild concern about potential size of the env var, but that's a problem for another time

@mark-thm mark-thm merged commit 940412f into theoremlp:main Nov 15, 2024
10 checks passed
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.

2 participants