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 a regression test for TypeVars that should be _typeshed.Self #6887

Closed
wants to merge 3 commits into from

Conversation

AlexWaygood
Copy link
Member

My attempt at a regression test for #6880, presented for your consideration. I'm aware that this would be a significant addition to check_new_syntax, so I understand if you don't want to merge this!

I've deliberately reintroduced some bad syntax, so you can see what it looks like when the test fails.

@JelleZijlstra
Copy link
Member

Thanks, I think checks like these are helpful.

I wish we'd put them in flake8-pyi though, so they're more reusable and we can use standard linter infrastructure (like noqa instead of hardcoding specific paths).

@AlexWaygood
Copy link
Member Author

Thanks, I think checks like these are helpful.

I wish we'd put them in flake8-pyi though, so they're more reusable and we can use standard linter infrastructure (like noqa instead of hardcoding specific paths).

I'm happy to file a PR over at flake8-pyi! This felt like a typeshed-specific change though (_typeshed is a private module, right?)

@JelleZijlstra
Copy link
Member

_typeshed can also be used in third-party stub packages, and error codes should make it easy for third-party users to control whether to enable this check.

@AlexWaygood
Copy link
Member Author

Great, I'll close this and refile over at flake8-pyi then :)

@AlexWaygood AlexWaygood deleted the self-typevar-test branch January 10, 2022 17:22
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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