ruff/crates/ruff_linter
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
..
resources Avoid syntax errors for test cases (#11923) 2024-06-18 17:16:27 +05:30
src ENH copyright-notice: check in the first 4096 bytes instead of 1024 (#11927) 2024-06-18 11:04:34 -05:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
Cargo.toml Bump version to v0.4.9 (#11872) 2024-06-14 20:36:22 +05:30