ruff/crates
Charlie Marsh 9781563ef6
Add fast-path for comment detection (#9808)
## Summary

When we fall through to parsing, the comment-detection rule is a
significant portion of lint time. This PR adds an additional fast
heuristic whereby we abort if a comment contains two consecutive name
tokens (via the zero-allocation lexer). For the `ctypeslib.py`, which
has a few cases that are now caught by this, it's a 2.5x speedup for the
rule (and a 20% speedup for token-based rules).
2024-02-05 11:00:18 -05:00
..
ruff Bump version to 0.2.0 (#9762) 2024-02-01 17:10:33 -06:00
ruff_benchmark Approximate tokens len (#9546) 2024-01-19 17:39:37 +01:00
ruff_cache Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_dev Add rule removal infrastructure (#9691) 2024-02-01 13:35:02 -06:00
ruff_diagnostics Enable annotation quoting for multi-line expressions (#9142) 2023-12-15 01:03:09 +00:00
ruff_formatter Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_index Make all dependencies workspace dependencies (#9333) 2024-01-02 13:41:59 +00:00
ruff_linter Add fast-path for comment detection (#9808) 2024-02-05 11:00:18 -05:00
ruff_macros Add rule removal infrastructure (#9691) 2024-02-01 13:35:02 -06:00
ruff_notebook Detect automagic-like assignments in notebooks (#9653) 2024-01-29 12:55:44 +00:00
ruff_python_ast Use `AhoCorasick` to speed up quote match (#9773) 2024-02-02 09:57:39 -05:00
ruff_python_codegen Remove source path from parser errors (#9322) 2023-12-30 20:33:05 +00:00
ruff_python_formatter Preview Style: Format module level docstring (#9725) 2024-02-05 15:03:34 +00:00
ruff_python_index Skip LibCST parsing for standard dedent adjustments (#9769) 2024-02-02 18:13:46 +00:00
ruff_python_literal Use Rust 1.75 toolchain (#9437) 2024-01-08 18:03:16 +01:00
ruff_python_parser Approximate tokens len (#9546) 2024-01-19 17:39:37 +01:00
ruff_python_resolver Use Rust 1.75 toolchain (#9437) 2024-01-08 18:03:16 +01:00
ruff_python_semantic Short-circuit typing matches based on imports (#9800) 2024-02-04 14:06:44 -05:00
ruff_python_stdlib Slight speed-up for lowercase and uppercase identifier checks (#9798) 2024-02-03 14:40:41 +00:00
ruff_python_trivia Add fast-path for comment detection (#9808) 2024-02-05 11:00:18 -05:00
ruff_shrinking Bump version to 0.2.0 (#9762) 2024-02-01 17:10:33 -06:00
ruff_source_file Range formatting API (#9635) 2024-01-31 11:13:37 +01:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Deduplicate deprecation warnings for v0.2.0 release (#9764) 2024-02-01 17:10:24 -06:00
ruff_workspace Add our own ignored-names abstractions (#9802) 2024-02-03 09:48:07 -05:00