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

Update known dunder methods for Python 3.13 #14146

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

dhruvmanila
Copy link
Member

Summary

Closes: #14145

@dhruvmanila dhruvmanila added bug Something isn't working python313 Related to Python 3.13 labels Nov 7, 2024
Comment on lines 306 to 309
)
) || method.starts_with("_repr_")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is for _repr_*

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe I should remove this as per the ecosystem changes

Copy link
Contributor

github-actions bot commented Nov 7, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+276 -278 violations, +0 -0 fixes in 7 projects; 47 projects unchanged)

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

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

- airflow/cli/cli_config.py:82:9: A002 Argument `help` is shadowing a Python builtin
+ airflow/cli/cli_config.py:82:9: A002 Function argument `help` is shadowing a Python builtin
- airflow/cli/cli_config.py:86:9: A002 Argument `type` is shadowing a Python builtin
+ airflow/cli/cli_config.py:86:9: A002 Function argument `type` is shadowing a Python builtin
- airflow/models/pool.py:96:25: A002 Argument `id` is shadowing a Python builtin
+ airflow/models/pool.py:96:25: A002 Function argument `id` is shadowing a Python builtin
- airflow/models/taskinstance.py:229:26: A002 Argument `id` is shadowing a Python builtin
+ airflow/models/taskinstance.py:229:26: A002 Function argument `id` is shadowing a Python builtin
- airflow/traces/tracer.py:38:28: A002 Argument `list` is shadowing a Python builtin
+ airflow/traces/tracer.py:38:28: A002 Function argument `list` is shadowing a Python builtin
- airflow/traces/utils.py:36:53: A002 Argument `type` is shadowing a Python builtin
+ airflow/traces/utils.py:36:53: A002 Function argument `type` is shadowing a Python builtin
- dev/assign_cherry_picked_prs_with_milestone.py:381:27: A002 Argument `type` is shadowing a Python builtin
+ dev/assign_cherry_picked_prs_with_milestone.py:381:27: A002 Function argument `type` is shadowing a Python builtin
... 144 additional changes omitted for project

apache/superset (+12 -13 violations, +0 -0 fixes)

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

- superset/migrations/versions/2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py:228:27: A002 Argument `sum` is shadowing a Python builtin
- superset/models/helpers.py:1429:9: A002 Argument `filter` is shadowing a Python builtin
+ superset/models/helpers.py:1429:9: A002 Function argument `filter` is shadowing a Python builtin
- superset/utils/core.py:590:15: A002 Argument `type` is shadowing a Python builtin
+ superset/utils/core.py:590:15: A002 Function argument `type` is shadowing a Python builtin
- superset/utils/core.py:609:15: A002 Argument `type` is shadowing a Python builtin
+ superset/utils/core.py:609:15: A002 Function argument `type` is shadowing a Python builtin
- tests/integration_tests/base_tests.py:598:9: A002 Argument `filter` is shadowing a Python builtin
+ tests/integration_tests/base_tests.py:598:9: A002 Function argument `filter` is shadowing a Python builtin
- tests/integration_tests/celery_tests.py:64:21: A002 Argument `id` is shadowing a Python builtin
... 15 additional changes omitted for project

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

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

- src/bokeh/core/property/alias.py:83:46: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/alias.py:83:46: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/alias.py:98:39: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/alias.py:98:39: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/any.py:83:58: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/any.py:83:58: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:110:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:110:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:139:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:139:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:449:93: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:449:93: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:460:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:460:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:516:96: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:516:96: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/color.py:124:112: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/color.py:124:112: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/color.py:176:55: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/color.py:176:55: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/constraints.py:60:9: A002 Argument `type` is shadowing a Python builtin
... 213 additional changes omitted for project

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


zulip/zulip (+52 -53 violations, +0 -0 fixes)

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

- analytics/lib/counts.py:418:25: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:418:25: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:432:5: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:432:5: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:475:9: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:475:9: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:523:5: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:523:5: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:57:9: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:57:9: A002 Function argument `property` is shadowing a Python builtin
... 95 additional changes omitted for project

zanieb/huggingface-notebooks (+8 -8 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select A,E703,F704,B015,B018,D100

- course/fr/chapter9/section4.ipynb:cell 5:17:13: A002 Argument `input` is shadowing a Python builtin
+ course/fr/chapter9/section4.ipynb:cell 5:17:13: A002 Function argument `input` is shadowing a Python builtin
- diffusers/exploring_simple optimizations_for_sdxl.ipynb:cell 6:10:25: A002 Argument `bytes` is shadowing a Python builtin
+ diffusers/exploring_simple optimizations_for_sdxl.ipynb:cell 6:10:25: A002 Function argument `bytes` is shadowing a Python builtin
- diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb:cell 15:1:13: A002 Argument `dict` is shadowing a Python builtin
+ diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb:cell 15:1:13: A002 Function argument `dict` is shadowing a Python builtin
- diffusers/sd_textual_inversion_training.ipynb:cell 22:12:9: A002 Argument `set` is shadowing a Python builtin
+ diffusers/sd_textual_inversion_training.ipynb:cell 22:12:9: A002 Function argument `set` is shadowing a Python builtin
- diffusers/stable_diffusion_textual_inversion_library_navigator.ipynb:cell 7:6:24: A002 Argument `id` is shadowing a Python builtin
+ diffusers/stable_diffusion_textual_inversion_library_navigator.ipynb:cell 7:6:24: A002 Function argument `id` is shadowing a Python builtin
... 6 additional changes omitted for project

openai/openai-cookbook (+8 -8 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select A,E703,F704,B015,B018,D100

- examples/Custom-LLM-as-a-Judge.ipynb:cell 13:21:25: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 13:21:25: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 15:13:16: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 15:13:16: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 18:2:25: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 18:2:25: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 23:37:22: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 23:37:22: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 24:1:16: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 24:1:16: A002 Function argument `input` is shadowing a Python builtin
... 6 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
A002 554 276 278 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+276 -278 violations, +0 -0 fixes in 6 projects; 48 projects unchanged)

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

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

- airflow/cli/cli_config.py:82:9: A002 Argument `help` is shadowing a Python builtin
+ airflow/cli/cli_config.py:82:9: A002 Function argument `help` is shadowing a Python builtin
- airflow/cli/cli_config.py:86:9: A002 Argument `type` is shadowing a Python builtin
+ airflow/cli/cli_config.py:86:9: A002 Function argument `type` is shadowing a Python builtin
- airflow/models/pool.py:96:25: A002 Argument `id` is shadowing a Python builtin
+ airflow/models/pool.py:96:25: A002 Function argument `id` is shadowing a Python builtin
- airflow/models/taskinstance.py:229:26: A002 Argument `id` is shadowing a Python builtin
+ airflow/models/taskinstance.py:229:26: A002 Function argument `id` is shadowing a Python builtin
- airflow/traces/tracer.py:38:28: A002 Argument `list` is shadowing a Python builtin
+ airflow/traces/tracer.py:38:28: A002 Function argument `list` is shadowing a Python builtin
- airflow/traces/utils.py:36:53: A002 Argument `type` is shadowing a Python builtin
+ airflow/traces/utils.py:36:53: A002 Function argument `type` is shadowing a Python builtin
- dev/assign_cherry_picked_prs_with_milestone.py:381:27: A002 Argument `type` is shadowing a Python builtin
+ dev/assign_cherry_picked_prs_with_milestone.py:381:27: A002 Function argument `type` is shadowing a Python builtin
... 144 additional changes omitted for project

apache/superset (+12 -13 violations, +0 -0 fixes)

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

- superset/migrations/versions/2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py:228:27: A002 Argument `sum` is shadowing a Python builtin
- superset/models/helpers.py:1429:9: A002 Argument `filter` is shadowing a Python builtin
+ superset/models/helpers.py:1429:9: A002 Function argument `filter` is shadowing a Python builtin
- superset/utils/core.py:590:15: A002 Argument `type` is shadowing a Python builtin
+ superset/utils/core.py:590:15: A002 Function argument `type` is shadowing a Python builtin
- superset/utils/core.py:609:15: A002 Argument `type` is shadowing a Python builtin
+ superset/utils/core.py:609:15: A002 Function argument `type` is shadowing a Python builtin
- tests/integration_tests/base_tests.py:598:9: A002 Argument `filter` is shadowing a Python builtin
+ tests/integration_tests/base_tests.py:598:9: A002 Function argument `filter` is shadowing a Python builtin
- tests/integration_tests/celery_tests.py:64:21: A002 Argument `id` is shadowing a Python builtin
... 15 additional changes omitted for project

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

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

- src/bokeh/core/property/alias.py:83:46: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/alias.py:83:46: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/alias.py:98:39: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/alias.py:98:39: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/any.py:83:58: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/any.py:83:58: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:110:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:110:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:139:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:139:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:449:93: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:449:93: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:460:57: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:460:57: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/bases.py:516:96: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/bases.py:516:96: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/color.py:124:112: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/color.py:124:112: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/color.py:176:55: A002 Argument `help` is shadowing a Python builtin
+ src/bokeh/core/property/color.py:176:55: A002 Function argument `help` is shadowing a Python builtin
- src/bokeh/core/property/constraints.py:60:9: A002 Argument `type` is shadowing a Python builtin
... 213 additional changes omitted for project

zulip/zulip (+52 -53 violations, +0 -0 fixes)

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

- analytics/lib/counts.py:418:25: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:418:25: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:432:5: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:432:5: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:475:9: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:475:9: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:523:5: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:523:5: A002 Function argument `property` is shadowing a Python builtin
- analytics/lib/counts.py:57:9: A002 Argument `property` is shadowing a Python builtin
+ analytics/lib/counts.py:57:9: A002 Function argument `property` is shadowing a Python builtin
... 95 additional changes omitted for project

zanieb/huggingface-notebooks (+8 -8 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select A,E703,F704,B015,B018,D100

- course/fr/chapter9/section4.ipynb:cell 5:17:13: A002 Argument `input` is shadowing a Python builtin
+ course/fr/chapter9/section4.ipynb:cell 5:17:13: A002 Function argument `input` is shadowing a Python builtin
- diffusers/exploring_simple optimizations_for_sdxl.ipynb:cell 6:10:25: A002 Argument `bytes` is shadowing a Python builtin
+ diffusers/exploring_simple optimizations_for_sdxl.ipynb:cell 6:10:25: A002 Function argument `bytes` is shadowing a Python builtin
- diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb:cell 15:1:13: A002 Argument `dict` is shadowing a Python builtin
+ diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb:cell 15:1:13: A002 Function argument `dict` is shadowing a Python builtin
- diffusers/sd_textual_inversion_training.ipynb:cell 22:12:9: A002 Argument `set` is shadowing a Python builtin
+ diffusers/sd_textual_inversion_training.ipynb:cell 22:12:9: A002 Function argument `set` is shadowing a Python builtin
- diffusers/stable_diffusion_textual_inversion_library_navigator.ipynb:cell 7:6:24: A002 Argument `id` is shadowing a Python builtin
+ diffusers/stable_diffusion_textual_inversion_library_navigator.ipynb:cell 7:6:24: A002 Function argument `id` is shadowing a Python builtin
... 6 additional changes omitted for project

openai/openai-cookbook (+8 -8 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select A,E703,F704,B015,B018,D100

- examples/Custom-LLM-as-a-Judge.ipynb:cell 13:21:25: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 13:21:25: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 15:13:16: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 15:13:16: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 18:2:25: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 18:2:25: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 23:37:22: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 23:37:22: A002 Function argument `input` is shadowing a Python builtin
- examples/Custom-LLM-as-a-Judge.ipynb:cell 24:1:16: A002 Argument `input` is shadowing a Python builtin
+ examples/Custom-LLM-as-a-Judge.ipynb:cell 24:1:16: A002 Function argument `input` is shadowing a Python builtin
... 6 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
A002 554 276 278 0 0

@dhruvmanila dhruvmanila merged commit 5b500b8 into main Nov 7, 2024
20 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/313-dunder branch November 7, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python313 Related to Python 3.13
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bad-dunder-method-name (PLW3201) - false positive on __replace__ dunder
2 participants