Skip to content

Make sure we use VERSIONS file in typeshed, refs #12062 #12066

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

Closed
wants to merge 1 commit into from
Closed

Make sure we use VERSIONS file in typeshed, refs #12062 #12066

wants to merge 1 commit into from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 25, 2022

I don't know how I can test this, but local testing shows that everything works fine.
Ideas? 🤔

CC @srittau
Closes #12062

@sobolevn sobolevn requested a review from hauntsaninja January 25, 2022 13:24
@@ -1132,7 +1145,13 @@ def get_typeshed_stdlib_modules(custom_typeshed_dir: Optional[str]) -> List[str]
if path.stem == "__init__":
path = path.parent
module = ".".join(path.relative_to(stdlib_dir).parts[:-1] + (path.stem,))
if module.split(".")[0] in packages:
if (
module.split(".")[0] in packages
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is now a bit suspect to me:

  • It only checks the top-level name of the package.
  • And it shouldn't be necessary, since the package name doesn't get added to packages if the module is not supported, due to the check above.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Jan 27, 2022

Thanks for finding this! Yeah, I agree with srittau. I opened a different version in #12083, which should also correctly deal with subsubmodules.

JukkaL pushed a commit that referenced this pull request Jan 27, 2022
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.

3 participants