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

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

Merged
merged 6 commits into from Jan 16, 2024

Conversation

diceroll123
Copy link
Contributor

Summary

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

Test Plan

cargo test

Copy link
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
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
16 checks passed
Copy link

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.

None yet

2 participants