-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Lots of TODOs and things to clean up here, but it demonstrates the working lint rule. ## Test Plan ``` ➜ cat main.py from typing import override from base import B class C(B): @OverRide def method(self): pass ➜ cat base.py class B: pass ➜ cat typing.py def override(func): return func ``` (We provide our own `typing.py` since we don't have typeshed vendored or type stub support yet.) ``` ➜ ./target/debug/red_knot main.py ... 1 0.012086s TRACE red_knot Main Loop: Tick [crates/red_knot/src/main.rs:157:21] diagnostics = [ "Method C.method is decorated with `typing.override` but does not override any base class method", ] ``` If we add `def method(self): pass` to class `B` in `base.py` and run red_knot again, there is no lint error. --------- Co-authored-by: Micha Reiser <micha@reiser.io>
- Loading branch information
1 parent
dd42961
commit b6b4ad9
Showing
4 changed files
with
462 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.