ruff/crates/ruff_linter/resources/test/fixtures/refurb
Vasco Schiavo f8061e8b99
[refurb] Mark the FURB161 fix unsafe except for integers and booleans (#17240)
The PR fixes #16457 .

Specifically, `FURB161` is marked safe, but the rule generates safe
fixes only in specific cases. Therefore, we attempt to mark the fix as
unsafe when we are not in one of these cases.

For instances, the fix is marked as aunsafe just in case of strings (as
pointed out in the issue). Let me know if I should change something.

---------

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2025-04-18 13:46:01 -04:00
..
FURB101.py [refurb] Do not allow any keyword arguments for read-whole-file in rb mode (FURB101) (#10803) 2024-04-06 12:41:39 -04:00
FURB103.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
FURB105.py Treat sep arguments with effects as unsafe removals (#13165) 2024-08-30 12:17:47 -04:00
FURB110.py Respect operator precedence in FURB110 (#11464) 2024-05-19 03:17:11 +00:00
FURB113.py Avoid FURB113 autofix if comments are present (#8494) 2023-11-09 03:10:11 +00:00
FURB116.py [refurb] Implement fstring-number-format (FURB116) (#10921) 2024-04-26 01:15:33 +00:00
FURB118.py Fix bug where methods defined using lambdas were flagged by FURB118 (#14639) 2024-11-28 12:58:23 +00:00
FURB122.py [refurb] Handle unparenthesized tuples correctly (FURB122, FURB142) (#15953) 2025-02-05 10:16:54 +01:00
FURB129.py Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
FURB131.py Improve inference capabilities of the BuiltinTypeChecker (#10976) 2024-04-16 18:53:22 +01:00
FURB132.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
FURB136.py Implement FURB136 (#8664) 2023-11-15 18:10:13 +00:00
FURB140.py Avoid suggesting starmap when arguments are used outside call (#11830) 2024-06-10 17:10:06 -04:00
FURB142.py [refurb] Handle unparenthesized tuples correctly (FURB122, FURB142) (#15953) 2025-02-05 10:16:54 +01:00
FURB145.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
FURB148.py Check sequence type before triggering unnecessary-enumerate (FURB148) len suggestion (#7781) 2023-10-03 14:39:14 +00:00
FURB152.py [refurb] Avoid false positives for math-constant (FURB152) (#9290) 2023-12-27 09:45:37 -05:00
FURB154.py [refurb] Implement repeated-global (FURB154) (#11187) 2024-06-08 20:35:40 +00:00
FURB156.py [FURB156] Do not consider docstring(s) (#16391) 2025-02-26 16:30:13 +00:00
FURB157.py [refurb] Avoid panicking unwrap in verbose-decimal-constructor (FURB157) (#16777) 2025-03-17 05:09:07 -05:00
FURB161.py [refurb] Mark the FURB161 fix unsafe except for integers and booleans (#17240) 2025-04-18 13:46:01 -04:00
FURB162.py [refurb] Manual timezone monkeypatching (FURB162) (#16113) 2025-02-18 14:35:33 +01:00
FURB163.py Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
FURB164.py [refurb] Implement unnecessary-from-float (FURB164) (#10647) 2024-03-30 07:04:01 -04:00
FURB166.py [refurb] Implement int-on-sliced-str (FURB166) (#10650) 2024-04-02 19:29:42 +00:00
FURB167.py [refurb] Implement regex-flag-alias with fix (FURB167) (#9516) 2024-01-14 23:40:17 +00:00
FURB168.py [refurb] Avoid None | None as well as better detection and fix (FURB168) (#15779) 2025-01-31 11:34:57 +00:00
FURB169.py [refurb] Also report non-name expressions (FURB169) (#15905) 2025-02-05 08:46:37 +01:00
FURB171.py [refurb] Mark fix as unsafe if there are comments (FURB171) (#15832) 2025-01-30 17:21:07 -06:00
FURB177.py [refurb] Implement implicit-cwd (FURB177) (#7704) 2023-09-29 02:18:59 +00:00
FURB180.py [refurb] Implement metaclass_abcmeta (FURB180) (#9658) 2024-01-31 22:31:12 +00:00
FURB181.py [refurb] Implement hashlib-digest-hex (FURB181) (#9077) 2023-12-10 02:00:11 +00:00
FURB187.py [refurb] Implement list_assign_reversed lint (FURB187) (#10212) 2024-03-21 17:09:09 +00:00
FURB188.py [refurb] Correctly handle lengths of literal strings in slice-to-remove-prefix-or-suffix (FURB188) (#16237) 2025-02-18 12:52:26 -06:00
FURB189.py [refurb] Check for subclasses includes subscript expressions (FURB189) (#16155) 2025-02-14 20:21:26 +01:00
FURB192.py [refurb] New rule to suggest min/max over sorted() (FURB192) (#10868) 2024-04-23 01:13:57 +00:00