Skip to content

Conversation

@chirizxc
Copy link
Contributor

@chirizxc chirizxc commented Jul 12, 2025

Summary

Part of #2331

Test Plan

cargo nextest run flake8_use_pathlib

@chirizxc
Copy link
Contributor Author

chirizxc commented Jul 12, 2025

most test in full_name.py return TypeError: rename() missing required argument 'dst' (pos 2)

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

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

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

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

+ airflow-core/src/airflow/configuration.py:2131:9: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- airflow-core/src/airflow/configuration.py:2131:9: PTH101 `os.chmod()` should be replaced by `Path.chmod()`
+ airflow-core/src/airflow/dag_processing/bundles/base.py:391:13: PTH105 [*] `os.replace()` should be replaced by `Path.replace()`
- airflow-core/src/airflow/dag_processing/bundles/base.py:391:13: PTH105 `os.replace()` should be replaced by `Path.replace()`
+ airflow-core/src/airflow/utils/log/file_task_handler.py:845:17: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- airflow-core/src/airflow/utils/log/file_task_handler.py:845:17: PTH101 `os.chmod()` should be replaced by `Path.chmod()`
+ airflow-core/tests/unit/core/test_impersonation_tests.py:71:17: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- airflow-core/tests/unit/core/test_impersonation_tests.py:71:17: PTH101 `os.chmod()` should be replaced by `Path.chmod()`
+ airflow-core/tests/unit/core/test_impersonation_tests.py:80:21: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- airflow-core/tests/unit/core/test_impersonation_tests.py:80:21: PTH101 `os.chmod()` should be replaced by `Path.chmod()`
+ airflow-core/tests/unit/core/test_impersonation_tests.py:87:13: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- airflow-core/tests/unit/core/test_impersonation_tests.py:87:13: PTH101 `os.chmod()` should be replaced by `Path.chmod()`
+ dev/breeze/src/airflow_breeze/utils/kubernetes_utils.py:104:13: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
... 14 additional changes omitted for rule PTH101
+ dev/breeze/src/airflow_breeze/utils/reproducible.py:144:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- dev/breeze/src/airflow_breeze/utils/reproducible.py:144:9: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ scripts/in_container/run_migration_reference.py:212:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- scripts/in_container/run_migration_reference.py:212:9: PTH104 `os.rename()` should be replaced by `Path.rename()`

latchbio/latch (+0 -0 violations, +2 -0 fixes)

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

+ src/latch_cli/utils/__init__.py:278:9: PTH101 [*] `os.chmod()` should be replaced by `Path.chmod()`
- src/latch_cli/utils/__init__.py:278:9: PTH101 `os.chmod()` should be replaced by `Path.chmod()`

zulip/zulip (+0 -0 violations, +16 -0 fixes)

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

+ scripts/lib/zulip_tools.py:60:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- scripts/lib/zulip_tools.py:60:9: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ scripts/lib/zulip_tools.py:730:5: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- scripts/lib/zulip_tools.py:730:5: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ tools/lib/provision_inner.py:158:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- tools/lib/provision_inner.py:158:9: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ zerver/management/commands/export_usermessage_batch.py:46:17: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- zerver/management/commands/export_usermessage_batch.py:46:17: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ zerver/management/commands/export_usermessage_batch.py:60:17: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- zerver/management/commands/export_usermessage_batch.py:60:17: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ zerver/management/commands/fetch_tor_exit_nodes.py:70:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- zerver/management/commands/fetch_tor_exit_nodes.py:70:9: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ zerver/tornado/event_queue.py:714:9: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- zerver/tornado/event_queue.py:714:9: PTH104 `os.rename()` should be replaced by `Path.rename()`
+ zerver/worker/base.py:151:13: PTH104 [*] `os.rename()` should be replaced by `Path.rename()`
- zerver/worker/base.py:151:13: PTH104 `os.rename()` should be replaced by `Path.rename()`

Changes by rule (3 rules affected)

code total + violation - violation + fix - fix
PTH101 26 0 0 26 0
PTH104 20 0 0 20 0
PTH105 2 0 0 2 0

@MichaReiser MichaReiser added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jul 14, 2025
@MichaReiser MichaReiser requested a review from ntBre July 14, 2025 09:14
@chirizxc
Copy link
Contributor Author

@ntBre, this PR breaks past behavior when it did diagnostics even for functions with one argument, I don't think this behavior was correct

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.

2 participants