mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00

## Summary add [`FURB167`/`use-long-regex-flag`](https://github.com/dosisod/refurb/blob/master/refurb/checks/regex/use_long_flag.py) with autofix See: #1348 ## Test Plan `cargo test` --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
22 lines
322 B
Python
22 lines
322 B
Python
def func():
|
|
import re
|
|
|
|
# OK
|
|
if re.match("^hello", "hello world", re.IGNORECASE):
|
|
pass
|
|
|
|
|
|
def func():
|
|
import re
|
|
|
|
# FURB167
|
|
if re.match("^hello", "hello world", re.I):
|
|
pass
|
|
|
|
|
|
def func():
|
|
from re import match, I
|
|
|
|
# FURB167
|
|
if match("^hello", "hello world", I):
|
|
pass
|