stubtest: fix false-positive error for Protocol `__init__`s and Protocol `__annotations__` by AlexWaygood · Pull Request #13179 · python/mypy · GitHub

github.com

Tin mới

AlexWaygood:stubtest-proto

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Security and quality 0

stubtest: fix false-positive error for Protocol __init__s

View reviewed changes

Learn more about hiding disruptive comments

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

python/cpython#31628

Should this check whether runtime.__init__ is Protocol.__init__? E.g., given python/cpython#31628

https://github.com/python/cpython/blob/3f738600f623b88bc90ec12587f75babb6f1025e/Lib/typing.py#L2086-L2087

Should this check whether runtime.__init__ is Protocol.__init__? E.g., given python/cpython#31628

Add TODO, fix __annotations__ bug

View reviewed changes

stubtest false positive for Protocol __init__

Successfully merging this pull request may close these issues.