Skip to content

Conversation

Lee-W
Copy link
Contributor

@Lee-W Lee-W commented May 8, 2025

Summary

ProviderReplacement::Name was designed back when we only wanted to do linting. Now we also want to fix the user code. It would be easier for us to replace them with better AutoImport struct.

Test Plan

The test fixture has been updated as some cases can now be fixed

Copy link
Contributor

github-actions bot commented May 8, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@Lee-W Lee-W changed the title refactor(AIR302,-AIR312): get rid of ProviderReplacement::ProviderNam… [airflow] Get rid of ProviderName::Name and replace them with ProviderName::AutoImport for enabling auto fixing May 8, 2025
@Lee-W Lee-W changed the title [airflow] Get rid of ProviderName::Name and replace them with ProviderName::AutoImport for enabling auto fixing [airflow] Get rid of ProviderName::Name and replace them with ProviderName::AutoImport for enabling auto fixing (AIR302, AIR312) May 8, 2025
@Lee-W Lee-W marked this pull request as ready for review May 8, 2025 11:53
@Lee-W Lee-W changed the title [airflow] Get rid of ProviderName::Name and replace them with ProviderName::AutoImport for enabling auto fixing (AIR302, AIR312) [airflow] Get rid of ProviderReplacement::Name and replace them with ProviderReplacement::AutoImport for enabling auto fixing (AIR302, AIR312) May 8, 2025
@Lee-W Lee-W force-pushed the refactor-AIR302-ARI312 branch from fa7065a to 5ce52af Compare May 12, 2025 10:56
@ntBre ntBre self-requested a review May 13, 2025 01:39
@Lee-W Lee-W force-pushed the refactor-AIR302-ARI312 branch 2 times, most recently from 07f64dd to 842be1b Compare May 14, 2025 13:27
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@ntBre
Copy link
Contributor

ntBre commented May 14, 2025

Just need to fix the very minor clippy lint.

… and replace them as ProviderName::AutoImport
@Lee-W Lee-W force-pushed the refactor-AIR302-ARI312 branch from 842be1b to 39df309 Compare May 15, 2025 02:52
@Lee-W
Copy link
Contributor Author

Lee-W commented May 15, 2025

Thanks for reminding me! I forgot to backport the fix to this one.

@ntBre ntBre added rule Implementing or modifying a lint rule preview Related to preview mode features labels May 15, 2025
@ntBre ntBre changed the title [airflow] Get rid of ProviderReplacement::Name and replace them with ProviderReplacement::AutoImport for enabling auto fixing (AIR302, AIR312) [airflow] Add autofixes for AIR302 and AIR312 May 15, 2025
@ntBre ntBre merged commit 2ceba6a into astral-sh:main May 15, 2025
34 checks passed
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request May 21, 2025
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

`ProviderReplacement::Name` was designed back when we only wanted to do
linting. Now we also want to fix the user code. It would be easier for
us to replace them with better AutoImport struct.

## Test Plan

<!-- How was it tested? -->

The test fixture has been updated as some cases can now be fixed
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.

2 participants