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

[pycodestyle] Remove deprecated functionality from type-comparison (E721) #11220

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

augustelalande
Copy link
Contributor

@augustelalande augustelalande commented Apr 30, 2024

Summary

Stabilizes E721 behavior implemented in #7905.

The functionality change in E721 was implemented in #7905, released in v0.1.2. And seems functionally stable since #9676, without an explicit release but would correspond to v0.2.0. So the deprecated functionally should be removable in the next minor release.

resolves: #6465

@zanieb
Copy link
Member

zanieb commented Apr 30, 2024

To clarify, this looks like it stabilizes the preview behavior introduced in #9676 correct?

@zanieb zanieb added this to the v0.5.0 milestone Apr 30, 2024
@augustelalande
Copy link
Contributor Author

Yes, sorry I wasn't clear. I updated the PR summary accordingly.

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+313 -251 violations, +0 -0 fixes in 19 projects; 25 projects unchanged)

DisnakeDev/disnake (+4 -0 violations, +0 -0 fixes)

+ disnake/ext/commands/params.py:807:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/ext/commands/test_params.py:143:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/ext/commands/test_params.py:146:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/ext/commands/test_params.py:214:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

RasaHQ/rasa (+12 -0 violations, +0 -0 fixes)

+ .github/tests/test_validate_gpus.py:26:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ rasa/shared/utils/io.py:66:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ rasa/shared/utils/io.py:68:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ rasa/shared/utils/io.py:93:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/cli/test_utils.py:458:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/cli/test_utils.py:513:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/conftest.py:891:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_actions.py:2811:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/shared/core/test_domain.py:1856:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/shared/core/training_data/story_reader/test_yaml_story_reader.py:272:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
... 2 additional changes omitted for project

alteryx/featuretools (+3 -0 violations, +0 -0 fixes)

+ featuretools/tests/entityset_tests/test_es.py:860:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ featuretools/tests/entityset_tests/test_serialization.py:134:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ featuretools/tests/entityset_tests/test_serialization.py:135:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

PlasmaPy/PlasmaPy (+1 -0 violations, +0 -0 fixes)

+ tests/particles/test_exceptions.py:1040:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

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

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ airflow/models/abstractoperator.py:425:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ airflow/models/abstractoperator.py:427:14: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ airflow/models/abstractoperator.py:429:14: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_configuration.py:1487:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_configuration.py:1497:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_configuration.py:1521:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_configuration.py:1526:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_stats.py:387:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/core/test_stats.py:394:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

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

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ tests/unit/bokeh/core/property/test_primitive.py:249:17: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ tests/unit/bokeh/models/test_sources.py:288:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

demisto/content (+124 -231 violations, +0 -0 fixes)

+ Packs/AHA/Integrations/AHA/AHA_test.py:89:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:355:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:355:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:356:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:356:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:357:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:357:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:358:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:358:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:359:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-GuardDuty/Integrations/AWSGuardDutyEventCollector/AWSGuardDutyEventCollector_test.py:359:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM_test.py:433:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM_test.py:433:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS-SecurityHub/Integrations/AWS_SecurityHub/AWS_SecurityHub_test.py:323:12: E721 Do not compare types, use `isinstance()`
+ Packs/AWS-SecurityHub/Integrations/AWS_SecurityHub/AWS_SecurityHub_test.py:323:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AWS_Sagemaker/Integrations/AWSSagemaker/AWSSagemaker.py:52:8: E721 Do not compare types, use `isinstance()`
+ Packs/AWS_Sagemaker/Integrations/AWSSagemaker/AWSSagemaker.py:52:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/AbuseDB/Integrations/AbuseDB/AbuseDB.py:323:24: E721 Do not compare types, use `isinstance()`
- Packs/AcalvioShadowplex/Integrations/acalvioapp/acalvioapp.py:148:17: E721 Do not compare types, use `isinstance()`
- Packs/AcalvioShadowplex/Integrations/acalvioapp/acalvioapp.py:171:17: E721 Do not compare types, use `isinstance()`
- Packs/AcalvioShadowplex/Integrations/acalvioapp/acalvioapp.py:207:17: E721 Do not compare types, use `isinstance()`
- Packs/AcalvioShadowplex/Integrations/acalvioapp/acalvioapp.py:244:17: E721 Do not compare types, use `isinstance()`
- Packs/AccentureCTI/Integrations/ACTIIndicatorQuery/ACTIIndicatorQuery.py:230:8: E721 Do not compare types, use `isinstance()`
- Packs/AccentureCTI/Integrations/ACTIIndicatorQuery/ACTIIndicatorQuery.py:234:8: E721 Do not compare types, use `isinstance()`
- Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:36:13: E721 Do not compare types, use `isinstance()`
+ Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:36:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:36:40: E721 Do not compare types, use `isinstance()`
+ Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:36:40: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:37:17: E721 Do not compare types, use `isinstance()`
+ Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:37:17: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
- Packs/Active_Directory_Query/Scripts/SendEmailToManager/SendEmailToManager.py:43:42: E721 Do not compare types, use `isinstance()`
... 324 additional changes omitted for project

freedomofpress/securedrop (+0 -3 violations, +0 -0 fixes)

- admin/securedrop_admin/__init__.py:588:12: E721 Do not compare types, use `isinstance()`
- admin/securedrop_admin/__init__.py:590:12: E721 Do not compare types, use `isinstance()`
- admin/securedrop_admin/__init__.py:594:12: E721 Do not compare types, use `isinstance()`

ibis-project/ibis (+8 -0 violations, +0 -0 fixes)

+ ibis/backends/dask/convert.py:28:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/backends/pandas/convert.py:28:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/backends/tests/test_client.py:1094:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/tests/expr/test_sql_builtins.py:116:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/tests/expr/test_sql_builtins.py:117:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/tests/expr/test_sql_builtins.py:137:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/tests/expr/test_sql_builtins.py:174:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/tests/expr/test_sql_builtins.py:90:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

... Truncated remaining completed project reports due to GitHub comment length restrictions

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
E721 564 313 251 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@zanieb
Copy link
Member

zanieb commented Apr 30, 2024

Thanks this makes sense to me but we need to wait until 0.5.0 to merge.

Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

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

The ecosystem changes looks good to me. Thanks for doing this.

@dhruvmanila dhruvmanila added the rule Implementing or modifying a lint rule label Jun 25, 2024
@dhruvmanila dhruvmanila merged commit 2a28e97 into astral-sh:ruff-0.5 Jun 25, 2024
19 checks passed
@augustelalande augustelalande deleted the e721 branch June 25, 2024 17:14
@MichaReiser MichaReiser mentioned this pull request Jun 26, 2024
MichaReiser pushed a commit that referenced this pull request Jun 27, 2024
…` (`E721`) (#11220)

## Summary

Stabilizes `E721` behavior implemented in #7905.

The functionality change in `E721` was implemented in #7905, released in
[v0.1.2](https://github.com/astral-sh/ruff/releases/tag/v0.1.2). And
seems functionally stable since #9676, without an explicit release but
would correspond to
[v0.2.0](https://github.com/astral-sh/ruff/releases/tag/v0.2.0). So the
deprecated functionally should be removable in the next minor release.

resolves: #6465
MichaReiser pushed a commit that referenced this pull request Jun 27, 2024
…` (`E721`) (#11220)

## Summary

Stabilizes `E721` behavior implemented in #7905.

The functionality change in `E721` was implemented in #7905, released in
[v0.1.2](https://github.com/astral-sh/ruff/releases/tag/v0.1.2). And
seems functionally stable since #9676, without an explicit release but
would correspond to
[v0.2.0](https://github.com/astral-sh/ruff/releases/tag/v0.2.0). So the
deprecated functionally should be removable in the next minor release.

resolves: #6465
@DetachHead DetachHead mentioned this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type-comparison (E721) only works on some builtin classes and nothing else
3 participants