Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refurb] Implement regex-flag-alias with fix (FURB167) #9516

Merged
merged 2 commits into from Jan 14, 2024

Conversation

diceroll123
Copy link
Contributor

Summary

add FURB167/use-long-regex-flag with autofix

See: #1348

Test Plan

cargo test

Copy link
Contributor

github-actions bot commented Jan 14, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+15 -0 violations, +0 -0 fixes in 3 projects; 40 projects unchanged)

apache/airflow (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ airflow/providers/apache/spark/hooks/spark_submit.py:306:19: FURB167 [*] Use of regular expression alias `re.I`

bokeh/bokeh (+3 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ src/bokeh/core/property/visual.py:109:116: FURB167 [*] Use of regular expression alias `re.I`
+ src/bokeh/embed/util.py:363:60: FURB167 [*] Use of regular expression alias `re.S`
+ src/bokeh/embed/util.py:378:60: FURB167 [*] Use of regular expression alias `re.S`

zulip/zulip (+11 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ zerver/lib/compatibility.py:46:60: FURB167 [*] Use of regular expression alias `re.X`
+ zerver/lib/compatibility.py:97:48: FURB167 [*] Use of regular expression alias `re.I`
+ zerver/lib/compatibility.py:97:55: FURB167 [*] Use of regular expression alias `re.X`
+ zerver/lib/compatibility.py:99:61: FURB167 [*] Use of regular expression alias `re.I`
+ zerver/lib/compatibility.py:99:68: FURB167 [*] Use of regular expression alias `re.X`
+ zerver/lib/markdown/include.py:30:48: FURB167 [*] Use of regular expression alias `re.M`
+ zerver/lib/user_agent.py:12:5: FURB167 [*] Use of regular expression alias `re.X`
+ zerver/migrations/0041_create_attachments_for_old_messages.py:14:51: FURB167 [*] Use of regular expression alias `re.M`
+ zerver/openapi/markdown_extension.py:170:42: FURB167 [*] Use of regular expression alias `re.M`
+ zerver/openapi/markdown_extension.py:170:49: FURB167 [*] Use of regular expression alias `re.S`
+ zerver/tornado/sharding.py:20:32: FURB167 [*] Use of regular expression alias `re.I`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
FURB167 15 15 0 0 0

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Jan 14, 2024
@charliermarsh charliermarsh changed the title [refurb] - add FURB167/use-long-regex-flag with autofix [refurb] Implement regex-flag-alias with fix (FURB167) Jan 14, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) January 14, 2024 23:36
@charliermarsh charliermarsh merged commit 6183b8e into astral-sh:main Jan 14, 2024
16 checks passed
Copy link

codspeed-hq bot commented Jan 14, 2024

CodSpeed Performance Report

Merging #9516 will improve performances by 4.55%

Comparing diceroll123:add-FURB167 (de5f663) with main (0c0d3db)

Summary

⚡ 1 improvements
✅ 29 untouched benchmarks

Benchmarks breakdown

Benchmark main diceroll123:add-FURB167 Change
parser[numpy/ctypeslib.py] 12.8 ms 12.2 ms +4.55%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Related to preview mode features rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants