Skip to content

[tryceratops] Add fix for error-instead-of-exception (TRY400)#9520

Merged
charliermarsh merged 6 commits intoastral-sh:mainfrom
diceroll123:add-autofix-for-TRY400
Jan 16, 2024
Merged

[tryceratops] Add fix for error-instead-of-exception (TRY400)#9520
charliermarsh merged 6 commits intoastral-sh:mainfrom
diceroll123:add-autofix-for-TRY400

Conversation

@diceroll123
Copy link
Copy Markdown
Contributor

Summary

add autofix for error-instead-of-exception (TRY400)

Test Plan

cargo test

@diceroll123 diceroll123 force-pushed the add-autofix-for-TRY400 branch from b3d28d9 to ac1c934 Compare January 15, 2024 03:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -0 violations, +4 -0 fixes in 1 projects; 42 projects unchanged)

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

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

- airflow/sensors/base.py:260:21: TRY400 Use `logging.exception` instead of `logging.error`
+ airflow/sensors/base.py:260:21: TRY400 [*] Use `logging.exception` instead of `logging.error`
- airflow/www/extensions/init_jinja_globals.py:54:9: TRY400 Use `logging.exception` instead of `logging.error`
+ airflow/www/extensions/init_jinja_globals.py:54:9: TRY400 [*] Use `logging.exception` instead of `logging.error`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
TRY400 4 0 0 4 0

Copy link
Copy Markdown
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, thank you!

@charliermarsh charliermarsh changed the title [tryceratops] - add fix for error-instead-of-exception (TRY400) [tryceratops] Add fix for error-instead-of-exception (TRY400) Jan 16, 2024
@charliermarsh charliermarsh added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 16, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) January 16, 2024 02:34
@charliermarsh charliermarsh enabled auto-merge (squash) January 16, 2024 02:54
@charliermarsh charliermarsh merged commit 7ef7e0d into astral-sh:main Jan 16, 2024
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 16, 2024

CodSpeed Performance Report

Merging #9520 will degrade performances by 4.35%

Comparing diceroll123:add-autofix-for-TRY400 (47b4422) with main (f9331c7)

Summary

❌ 1 regressions
✅ 29 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main diceroll123:add-autofix-for-TRY400 Change
parser[numpy/ctypeslib.py] 12.2 ms 12.8 ms -4.35%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes Related to suggested fixes for violations preview Related to preview mode features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants