ruff/crates
Carl Meyer b6b4ad9949
[red-knot] @override lint rule (#11282)
## 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>
2024-05-09 09:25:08 -06:00
..
red_knot [red-knot] @override lint rule (#11282) 2024-05-09 09:25:08 -06:00
ruff [red-knot] Vendor typeshed's stdlib (#11340) 2024-05-09 12:44:53 +01:00
ruff_benchmark Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_cache Kick off Red-knot (#10849) 2024-04-27 08:34:00 +00:00
ruff_dev Docs: Link inline settings when not part of options section (#10499) 2024-03-21 16:33:58 +00:00
ruff_diagnostics Respect # noqa directives on __all__ openers (#10798) 2024-04-06 14:51:17 +00:00
ruff_formatter Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
ruff_index Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_linter [pylint] Detect pathlib.Path.open calls in unspecified-encoding (PLW1514) (#11288) 2024-05-09 12:36:20 +00:00
ruff_macros Fix comment copy/paste typo in newtype_index (#10892) 2024-04-11 18:43:52 -06:00
ruff_notebook Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_ast Move all module from the AST to the semantic crate (#11330) 2024-05-08 08:56:50 +00:00
ruff_python_ast_integration_tests Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_python_codegen Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_formatter Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_index Fix Indexer fails to identify continuation preceded by newline #10351 (#10354) 2024-03-12 00:35:41 -04:00
ruff_python_literal Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_parser Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic Improve ruff_python_semantic::all::extract_all_names() (#11335) 2024-05-08 17:09:31 +01:00
ruff_python_stdlib Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
ruff_python_trivia Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_python_trivia_integration_tests Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_server Touch-up error messages in server file discovery (#11285) 2024-05-05 13:20:51 -04:00
ruff_source_file Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Remove ImportMap (#11234) 2024-05-02 11:26:02 -07:00
ruff_workspace Add globbing to isort sections docs (#11311) 2024-05-06 18:12:29 +00:00