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

Remove preview gating for flake8-pie rules #9684

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

Both of the preview behaviors gated here seem like improvements, so let's make them stable in v0.2.0

@charliermarsh charliermarsh added this to the v0.2.0 milestone Jan 29, 2024
@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Jan 29, 2024
@charliermarsh charliermarsh marked this pull request as ready for review January 29, 2024 18:47
@charliermarsh charliermarsh removed the rule Implementing or modifying a lint rule label Jan 29, 2024
Copy link
Contributor

github-actions bot commented Jan 29, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+883 -3 violations, +6066 -0 fixes in 14 projects; 29 projects unchanged)

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

+ .github/tests/test_download_pretrained.py:10:29: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ .github/tests/test_mr_generate_summary.py:4:49: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ .github/tests/test_mr_publish_results.py:7:35: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ .github/tests/test_validate_gpus.py:8:22: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ .github/tests/test_validate_gpus.py:9:23: RUF100 [*] Unused `noqa` directive (unused: `E402`)

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

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

+ airflow/auth/managers/fab/security_manager/override.py:41:5: PIE790 [*] Unnecessary `...` literal
- airflow/cli/commands/task_command.py:80:21: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal[False, "db", "memory"]`
+ airflow/cli/commands/task_command.py:80:21: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal[False, "db", "memory"]`
+ airflow/configuration.py:1640:9: PLW0120 [*] `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
- airflow/configuration.py:1640:9: PLW0120 `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
- airflow/configuration.py:628:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/configuration.py:628:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- airflow/jobs/backfill_job_runner.py:523:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/jobs/backfill_job_runner.py:523:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
+ airflow/jobs/scheduler_job_runner.py:1583:13: PIE790 [*] Unnecessary `...` literal
... 192 additional changes omitted for project

aws/aws-sam-cli (+0 -0 violations, +6 -0 fixes)

- tests/integration/logs/test_logs_command.py:218:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ tests/integration/logs/test_logs_command.py:218:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- tests/unit/commands/deploy/test_deploy_context.py:10:47: F811 Redefinition of unused `DeployFailedError` from line 8
+ tests/unit/commands/deploy/test_deploy_context.py:10:47: F811 [*] Redefinition of unused `DeployFailedError` from line 8
- tests/unit/local/docker/test_lambda_image.py:8:27: F811 Redefinition of unused `parameterized` from line 5
+ tests/unit/local/docker/test_lambda_image.py:8:27: F811 [*] Redefinition of unused `parameterized` from line 5

bokeh/bokeh (+4 -0 violations, +2982 -0 fixes)

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

- examples/basic/annotations/arrow.py:1:1: D300 Use triple double quotes `"""`
+ examples/basic/annotations/arrow.py:1:1: D300 [*] Use triple double quotes `"""`
- examples/basic/annotations/arrowheads.py:1:1: D300 Use triple double quotes `"""`
+ examples/basic/annotations/arrowheads.py:1:1: D300 [*] Use triple double quotes `"""`
- examples/basic/annotations/band.py:1:1: D300 Use triple double quotes `"""`
+ examples/basic/annotations/band.py:1:1: D300 [*] Use triple double quotes `"""`
... 2941 additional changes omitted for rule D300
- setup.py:10:1: E401 Multiple imports on one line
+ setup.py:10:1: E401 [*] Multiple imports on one line
+ src/bokeh/application/handlers/code_runner.py:108:25: SIM910 [*] Use `d.get('__doc__')` instead of `d.get('__doc__', None)`
- src/bokeh/client/session.py:458:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/client/session.py:458:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/core/query.py:210:17: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/core/query.py:210:17: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
- src/bokeh/core/serialization.py:149:25: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal["bool", "object"]`
+ src/bokeh/core/serialization.py:149:25: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal["bool", "object"]`
- src/bokeh/core/serialization.py:718:9: PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
+ src/bokeh/core/serialization.py:718:9: PLR5501 [*] Use `elif` instead of `else` then `if`, to reduce indentation
... 11 additional changes omitted for rule PLR5501
- src/bokeh/models/plots.py:471:17: SIM114 Combine `if` branches using logical `or` operator
+ src/bokeh/models/plots.py:471:17: SIM114 [*] Combine `if` branches using logical `or` operator
- src/bokeh/models/plots.py:478:17: SIM114 Combine `if` branches using logical `or` operator
+ src/bokeh/models/plots.py:478:17: SIM114 [*] Combine `if` branches using logical `or` operator
... 2965 additional changes omitted for project

demisto/content (+825 -0 violations, +2830 -0 fixes)

+ Documentation/common_server_docs.py:178:32: SIM910 [*] Use `PY_IRREGULAR_FUNCS.get(a)` instead of `PY_IRREGULAR_FUNCS.get(a, None)`
+ Documentation/common_server_docs.py:185:32: SIM910 [*] Use `PY_IRREGULAR_FUNCS.get(a)` instead of `PY_IRREGULAR_FUNCS.get(a, None)`
- Packs/AMP/Integrations/AMPv2/AMPv2.py:3240:11: UP007 Use `X | Y` for type annotations
+ Packs/AMP/Integrations/AMPv2/AMPv2.py:3240:11: UP007 [*] Use `X | Y` for type annotations
- Packs/AMP/Integrations/AMPv2/AMPv2.py:3241:16: UP007 Use `X | Y` for type annotations
+ Packs/AMP/Integrations/AMPv2/AMPv2.py:3241:16: UP007 [*] Use `X | Y` for type annotations
- Packs/AMP/Integrations/AMPv2/AMPv2.py:3242:12: UP007 Use `X | Y` for type annotations
+ Packs/AMP/Integrations/AMPv2/AMPv2.py:3242:12: UP007 [*] Use `X | Y` for type annotations
... 2491 additional changes omitted for rule UP007
- Packs/ANYRUN/Integrations/ANYRUN/ANYRUN.py:924:12: SIM118 Use `key in dict` instead of `key in dict.keys()`
+ Packs/ANYRUN/Integrations/ANYRUN/ANYRUN.py:924:12: SIM118 [*] Use `key in dict` instead of `key in dict.keys()`
+ Packs/AWS-EC2/Integrations/AWS-EC2/AWS-EC2.py:1498:29: SIM910 [*] Use `args.get('IpPermissionsFull')` instead of `args.get('IpPermissionsFull', None)`
+ Packs/AWS-EC2/Integrations/AWS-EC2/AWS-EC2.py:1524:29: SIM910 [*] Use `args.get('IpPermissionsFull')` instead of `args.get('IpPermissionsFull', None)`
+ Packs/AWS-EC2/Integrations/AWS-EC2/AWS-EC2.py:1607:29: SIM910 [*] Use `args.get('IpPermissionsFull')` instead of `args.get('IpPermissionsFull', None)`
+ Packs/AWS-Enrichment-Remediation/Scripts/AWSRecreateSG/AWSRecreateSG.py:339:19: SIM910 [*] Use `args.get('instance_id')` instead of `args.get('instance_id', None)`
... 814 additional changes omitted for rule SIM910
- Packs/Absolute/Integrations/Absolute/Absolute.py:331:8: SIM118 Use `key not in dict` instead of `key not in dict.keys()`
+ Packs/Absolute/Integrations/Absolute/Absolute.py:331:8: SIM118 [*] Use `key not in dict` instead of `key not in dict.keys()`
- Packs/AlienVault_OTX/Integrations/AlienVault_OTX_v2/AlienVault_OTX_v2.py:282:46: SIM118 Use `key not in dict` instead of `key not in dict.keys()`
+ Packs/AlienVault_OTX/Integrations/AlienVault_OTX_v2/AlienVault_OTX_v2.py:282:46: SIM118 [*] Use `key not in dict` instead of `key not in dict.keys()`
... 323 additional changes omitted for rule SIM118
+ Packs/Carbon_Black_Enterprise_Response/Scripts/CBLiveGetFile/CBLiveGetFile.py:142:1: PLW0120 [*] `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
- Packs/Carbon_Black_Enterprise_Response/Scripts/CBLiveGetFile/CBLiveGetFile.py:142:1: PLW0120 `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
- Packs/GoogleDocs/Integrations/GoogleDocs/GoogleDocs.py:315:20: UP006 Use `collections.defaultdict` instead of `typing.DefaultDict` for type annotation
+ Packs/GoogleDocs/Integrations/GoogleDocs/GoogleDocs.py:315:20: UP006 [*] Use `collections.defaultdict` instead of `typing.DefaultDict` for type annotation
+ Packs/RubrikPolaris/Integrations/RubrikPolaris/RubrikPolaris_test.py:61:45: PIE807 [*] Prefer `dict` over useless lambda
+ Packs/ThreatQ/Integrations/ThreatQ_v2/ThreatQ_v2.py:589:5: PLW0120 [*] `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
- Packs/ThreatQ/Integrations/ThreatQ_v2/ThreatQ_v2.py:589:5: PLW0120 `else` clause on loop without a `break` statement; remove the `else` and dedent its contents
+ Packs/TrendMicroEmailSecurity/Integrations/TrendMicroEmailSecurityEventCollector/TrendMicroEmailSecurityEventCollector.py:70:5: PIE790 [*] Unnecessary `...` literal
... 3629 additional changes omitted for project

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

+ securedrop/manage.py:22:16: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:23:47: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:29:20: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:30:55: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:31:33: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:32:56: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:33:39: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/manage.py:42:80: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/scripts/rqrequeue:11:40: RUF100 [*] Unused `noqa` directive (unused: `E402`)
+ securedrop/scripts/rqrequeue:12:46: RUF100 [*] Unused `noqa` directive (unused: `E402`)
... 5 additional changes omitted for project

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

+ ibis/backends/pandas/execution/temporal.py:133:11: SIM910 [*] Use `OFFSET_CLASS.get(unit)` instead of `OFFSET_CLASS.get(unit, None)`
+ ibis/backends/pandas/execution/temporal.py:145:11: SIM910 [*] Use `OFFSET_CLASS.get(unit)` instead of `OFFSET_CLASS.get(unit, None)`
+ ibis/backends/pandas/execution/temporal.py:157:11: SIM910 [*] Use `OFFSET_CLASS.get(unit)` instead of `OFFSET_CLASS.get(unit, None)`
+ ibis/backends/pandas/execution/temporal.py:169:11: SIM910 [*] Use `OFFSET_CLASS.get(unit)` instead of `OFFSET_CLASS.get(unit, None)`
+ ibis/backends/postgres/datatypes.py:76:25: SIM910 [*] Use `_postgres_interval_fields.get(field)` instead of `_postgres_interval_fields.get(field, None)`
+ ibis/backends/risingwave/datatypes.py:71:25: SIM910 [*] Use `_postgres_interval_fields.get(field)` instead of `_postgres_interval_fields.get(field, None)`
+ ibis/backends/tests/test_map.py:227:46: SIM910 [*] Use `value.get(x)` instead of `value.get(x, None)`

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

Changes by rule (19 rules affected)

code total + violation - violation + fix - fix
D300 2946 0 0 2946 0
UP007 2498 0 0 2498 0
SIM910 848 848 0 0 0
SIM118 358 0 0 358 0
PLR5501 148 0 0 148 0
SIM114 60 0 0 60 0
PLW0120 26 0 0 26 0
RUF100 23 23 0 0 0
PYI030 8 0 0 8 0
PIE800 8 0 0 8 0
PIE790 6 6 0 0 0
PIE807 5 5 0 0 0
TRY400 4 0 0 4 0
F811 4 0 0 4 0
ANN001 2 1 1 0 0
E402 2 0 2 0 0
B033 2 0 0 2 0
E401 2 0 0 2 0
UP006 2 0 0 2 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+180 -0 violations, +0 -0 fixes in 5 projects; 38 projects unchanged)

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

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

+ tests/utils/tensorflow/test_rasa_layers.py:832:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

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

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

+ featuretools/entityset/entityset.py:402:17: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

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

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

+ examples/server/app/crossfilter/main.py:32:35: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

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

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

+ ibis/backends/bigquery/tests/system/test_client.py:222:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ ibis/backends/bigquery/tests/system/test_client.py:223:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

pandas-dev/pandas (+175 -0 violations, +0 -0 fixes)

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

+ pandas/core/_numba/extensions.py:52:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/algorithms.py:533:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/algorithms.py:790:36: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/algorithms.py:940:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/algorithms.py:940:38: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/array_algos/putmask.py:138:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/array_algos/putmask.py:44:13: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/datetimelike.py:661:40: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/datetimelike.py:774:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/datetimelike.py:780:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/datetimes.py:2426:10: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/interval.py:257:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/masked.py:968:30: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/numeric.py:164:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/string_arrow.py:656:32: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/timedeltas.py:1040:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/arrays/timedeltas.py:647:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/computation/expressions.py:200:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/construction.py:551:39: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/construction.py:605:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/construction.py:652:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/astype.py:103:10: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/astype.py:131:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/cast.py:1036:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/cast.py:1065:21: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/cast.py:1091:21: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/cast.py:1179:45: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/cast.py:1700:8: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/dtypes.py:450:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/dtypes/missing.py:643:10: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/frame.py:11535:33: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/frame.py:2482:24: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/frame.py:8129:20: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/groupby/generic.py:1670:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/groupby/groupby.py:1977:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexers/utils.py:321:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:5558:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7013:56: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7031:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7051:17: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7054:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7054:37: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:7124:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/base.py:873:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/indexes/datetimelike.py:156:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/internals/concat.py:371:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/internals/managers.py:509:16: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
+ pandas/core/nanops.py:1682:14: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
... 127 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
E721 180 180 0 0 0

@charliermarsh charliermarsh force-pushed the charlie/fix-stable branch 2 times, most recently from 8d8a979 to 52af028 Compare January 29, 2024 19:27
Base automatically changed from charlie/fix-stable to release/0.2.0 January 29, 2024 19:32
@charliermarsh charliermarsh merged commit d90a420 into release/0.2.0 Jan 29, 2024
16 checks passed
@charliermarsh charliermarsh deleted the charlie/prev branch January 29, 2024 19:40
@zanieb zanieb mentioned this pull request Jan 29, 2024
zanieb pushed a commit that referenced this pull request Jan 29, 2024
## Summary

Both of the preview behaviors gated here seem like improvements, so
let's make them stable in v0.2.0
zanieb pushed a commit that referenced this pull request Jan 30, 2024
## Summary

Both of the preview behaviors gated here seem like improvements, so
let's make them stable in v0.2.0
zanieb pushed a commit that referenced this pull request Feb 1, 2024
## Summary

Both of the preview behaviors gated here seem like improvements, so
let's make them stable in v0.2.0
zanieb pushed a commit that referenced this pull request Feb 1, 2024
## Summary

Both of the preview behaviors gated here seem like improvements, so
let's make them stable in v0.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant