ruff/crates/ruff_linter/resources/test/fixtures/pycodestyle
Charlie Marsh a6f7100b55
[`pycodestyle`] Allow `dtype` comparisons in `type-comparison` (#9676)
## Summary

Per https://github.com/astral-sh/ruff/issues/9570:

> `dtype` are a bit of a strange beast, but definitely best thought of
as instances, not classes, and they are meant to be comparable not just
to their own class, but also to the corresponding scalar types (e.g.,
`x.dtype == np.float32`) and strings (e.g., `x.dtype == ['i1,i4']`;
basically, `__eq__` always tries to do `dtype(other)`.

This PR thus allows comparisons to `dtype` in preview.

Closes https://github.com/astral-sh/ruff/issues/9570.

## Test Plan

`cargo test`
2024-01-29 12:39:01 -05:00
..
E11.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E20.py Allow space-before-colon after end-of-slice (#8838) 2023-11-25 18:16:43 +00:00
E21.py Avoid un-setting bracket flag in logical lines (#8380) 2023-10-31 10:30:15 -04:00
E22.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E23.py Fix invalid E231 error with f-strings (#8369) 2023-10-30 19:38:13 -04:00
E24.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E25.py Fix `E251` false positive inside f-strings (#7894) 2023-10-12 05:26:39 +00:00
E26.py Add fix for comment-related whitespace rules (#9075) 2023-12-09 15:18:07 -05:00
E27.py E274: allow tab indentation before keyword (#9099) 2023-12-11 15:25:31 -05:00
E40.py [`pycodestyle`] Add fix for `multiple-imports-on-one-line` (`E401`) (#9518) 2024-01-21 15:33:38 -05:00
E70.py Allow collapsed-ellipsis bodies in other statements (#8499) 2023-11-05 19:42:34 -05:00
E101.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E402.ipynb Update `E402` to work at cell level for notebooks (#8872) 2023-11-29 00:32:35 +00:00
E402_0.py Remove special pre-visit for module docstrings (#9261) 2023-12-23 10:03:12 -05:00
E402_1.py Remove special pre-visit for module docstrings (#9261) 2023-12-23 10:03:12 -05:00
E501.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E501_1.py Ignore overlong pragma comments when enforcing linter line length (#7692) 2023-09-29 23:26:52 +00:00
E501_2.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E501_3.py Ignore overlong pragma comments when enforcing linter line length (#7692) 2023-09-29 23:26:52 +00:00
E703.ipynb Avoid `E703` for last expression in a cell (#8821) 2023-11-23 07:40:57 -06:00
E711.py Avoid infinite loop in constant vs. `None` comparisons (#9376) 2024-01-02 22:04:52 -05:00
E712.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E713.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E714.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E721.py [`pycodestyle`] Allow `dtype` comparisons in `type-comparison` (#9676) 2024-01-29 12:39:01 -05:00
E722.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E731.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E741.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E742.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E743.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
E999.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W19.py Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
W29.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W292_0.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W292_1.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W292_2.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W292_3.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W292_4.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W293.py Fix continuation detection following multi-line strings (#9332) 2023-12-31 10:43:35 -05:00
W505.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W505_utf_8.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
W605_0.py Avoid syntax error via invalid ur string prefix (#8971) 2023-12-02 18:37:49 +00:00
W605_1.py Avoid syntax error via invalid ur string prefix (#8971) 2023-12-02 18:37:49 +00:00
constant_literals.py Add check for is comparison with mutable initialisers to rule F632 (#8607) 2023-11-11 00:29:23 +00:00
shebang.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00