gh-101561: Add typing.override decorator by stroxler · Pull Request #101564 · python/cpython
stroxler
changed the title
PEP 698: Add typing.override decorator
gh-101561: Add typing.override decorator
facebook-github-bot referenced this pull request in facebook/pyre-check
Summary: THe `typing_extensions.override` was added a few months ago, we should support it. The `typing.override` decorator isn't landed yet, but that's okay - we should support it in override checks; it will still raise a "no such name" method when Pyre is being run against a typeshed that doens't have it yet. The PR to add `typing.override` to CPython is out for review now: https://github.com/python/cpython/pull/101564` Reviewed By: grievejia Differential Revision: D43055550 fbshipit-source-id: 3f51f643063afea75bf54ef38ae3a48681b99bd9
Testing: First set up the repo, following instructions at https://devguide.python.org/ by running: ``` ./configure --with-pydebug && make -j ``` Then run the typing tests: ``` ./python -m test test_typing -v ``` I ran the full test suite with ``` ./python -m test -j3 ``` and it came back clean except for a `test_grp` failure which I seem to get on trunk as well - likely something in my build is misconfigured but I'm pretty sure it is unrelated to the changes here.
Correct `s/final/override` (from reusing a similar block of documentation on the `@final` decorator) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters