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

Stubtest: don't error if a module in a tests/ directory is missing from the stub #15725

Closed

Conversation

AlexWaygood
Copy link
Member

We have a quite a few allowlist entries in typeshed at the moment to get stubtest to stop complaining about tests/ directories being missing from the stubs. This PR fixes that.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks! Good point.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

On the other hand, this would interfere with our project: https://github.com/typeddjango/django-stubs/tree/master/django-stubs/test

Because, django.test is public, we want stubtest to raise warnings there.

I think it would be better to decide on a project basis.

@AlexWaygood
Copy link
Member Author

AlexWaygood commented Jul 21, 2023

It would still emit errors for modules in django.test that you have stubs for. It just wouldn't emit errors if any modules inside django.test are missing from the stub.

But yeah, I guess this is an unreliable heuristic, and should probably be decided per-project :/

@AlexWaygood AlexWaygood deleted the stubtest-missing-tests branch July 21, 2023 08:08
@AlexWaygood AlexWaygood restored the stubtest-missing-tests branch February 22, 2024 16:39
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