ruff/crates
Adrin Jalali 2e7c3454e0
ENH copyright-notice: check in the first 4096 bytes instead of 1024 (#11927)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary
related to https://github.com/astral-sh/ruff/issues/5306

The check right now only checks in the first 1024 bytes, and that's
really not enough when there's a docstring at the beginning of a file.

A more proper fix might be needed, which might be more complex (and I
don't have the `rust` skills to implement that). But this temporary
"fix" might enable more users to use this.

Context: We want to use this rule in
https://github.com/scikit-learn/scikit-learn/ and we got blocked because
of this hardcoded rule (which TBH took us quite a while to figure out
why it was failing since it's not documented).

## Test Plan

This is already kinda tested, modified the test for the new byte number.

<!-- How was it tested? -->
2024-06-18 11:04:34 -05:00
..
red_knot Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff Bump version to v0.4.9 (#11872) 2024-06-14 20:36:22 +05:30
ruff_benchmark Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_cache Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_db [red-knot]: Add a VendoredFileSystem implementation (#11863) 2024-06-18 15:43:39 +00:00
ruff_dev Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
ruff_diagnostics Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_formatter Fix formatter instability for lines only consisting of zero-width characters (#11748) 2024-06-05 17:55:14 +02:00
ruff_index Red-knot: Track scopes per expression (#11754) 2024-06-05 17:53:26 +02:00
ruff_linter ENH copyright-notice: check in the first 4096 bytes instead of 1024 (#11927) 2024-06-18 11:04:34 -05:00
ruff_macros Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_notebook ruff server: Support Jupyter Notebook (*.ipynb) files (#11206) 2024-05-21 22:29:30 +00:00
ruff_python_ast red-knot: source_text, line_index, and parsed_module queries (#11822) 2024-06-13 07:37:02 +00:00
ruff_python_ast_integration_tests Rename PreorderVisitor to SourceOrderVisitor (#11798) 2024-06-07 17:01:58 +00:00
ruff_python_codegen Isolate non-breaking whitespace indentation test case (#11721) 2024-06-03 13:20:55 +00:00
ruff_python_formatter Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff_python_index Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_python_literal Remove some unused pub functions (#11576) 2024-05-28 09:56:51 -04:00
ruff_python_parser Use re-lexing for normal list parsing (#11871) 2024-06-18 12:14:41 +05:30
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 red-knot: Symbol table (#11860) 2024-06-18 13:10:45 +00:00
ruff_python_stdlib Regenerate sys.rs with stdlibs==2024.5.15 (#11437) 2024-05-15 22:17:32 +00:00
ruff_python_trivia Move has_comments to CommentRanges (#11495) 2024-05-22 13:35:16 +00:00
ruff_python_trivia_integration_tests Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_server ruff server: Add tracing setup guide to Helix documentation (#11883) 2024-06-18 03:41:24 +00:00
ruff_source_file red-knot: source_text, line_index, and parsed_module queries (#11822) 2024-06-13 07:37:02 +00:00
ruff_text_size Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff_wasm Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_workspace Respect file exclusions in ruff server (#11590) 2024-05-29 02:58:36 +00:00