Skip to content

Stabilize os-symlink (PTH211) - #20229

Merged
ntBre merged 1 commit into
brent/0.13.0from
brent/pth211
Sep 4, 2025
Merged

ntBre merged 1 commit into
brent/0.13.0from
brent/pth211

Conversation

@ntBre

@ntBre ntBre commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Summary

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule until its fix is also ready for stabilization, but this is also the only preview PTH rule, so I think it's okay to stabilize the rule and later (probably in the next minor release) stabilize the fixes together.

Summary
--

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule until its
fix is also ready for stabilization, but this is also the only preview PTH rule,
so I think it's okay to stabilize the rule and later (probably in the next minor
release) stabilize the fixes together.

Test Plan
--
@ntBre ntBre added this to the v0.13 milestone Sep 4, 2025
@ntBre ntBre changed the title Stabilize PTH211 Stabilize os-symlink (PTH211) Sep 4, 2025
@ntBre ntBre added the rule Implementing or modifying a lint rule label Sep 4, 2025
@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

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

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

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

+ airflow-core/src/airflow/dag_processing/manager.py:854:25: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ airflow-core/src/airflow/dag_processing/manager.py:860:21: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ airflow-core/src/airflow/utils/log/file_processor_handler.py:127:25: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ airflow-core/src/airflow/utils/log/file_processor_handler.py:133:21: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ airflow-core/tests/unit/utils/test_file.py:107:9: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ airflow-core/tests/unit/utils/test_file.py:165:9: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ scripts/ci/prek/check_shared_distributions_usage.py:224:17: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ scripts/ci/prek/check_shared_distributions_usage.py:244:17: PTH211 `os.symlink` should be replaced by `Path.symlink_to`

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

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

+ scripts/lib/puppet_cache.py:48:5: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ scripts/lib/zulip_tools.py:55:13: PTH211 `os.symlink` should be replaced by `Path.symlink_to`
+ tools/lib/provision.py:59:5: PTH211 `os.symlink` should be replaced by `Path.symlink_to`

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

+ astropy/config/paths.py:210:17: PTH211 `os.symlink` should be replaced by `Path.symlink_to`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PTH211 12 12 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
ntBre marked this pull request as ready for review September 4, 2025 14:33
@ntBre
ntBre requested a review from dylwil3 September 4, 2025 14:33

@dylwil3 dylwil3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree we can stabilize the fixes together in the next minor

@ntBre
ntBre merged commit bb41f6b into brent/0.13.0 Sep 4, 2025
36 checks passed
@ntBre
ntBre deleted the brent/pth211 branch September 4, 2025 20:42
@ntBre ntBre mentioned this pull request Sep 4, 2025
2 tasks done
ntBre added a commit that referenced this pull request Sep 8, 2025
Summary
--

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule
until its fix is also ready for stabilization, but this is also the only
preview PTH rule, so I think it's okay to stabilize the rule and later
(probably in the next minor release) stabilize the fixes together.
ntBre added a commit that referenced this pull request Sep 10, 2025
Summary
--

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule
until its fix is also ready for stabilization, but this is also the only
preview PTH rule, so I think it's okay to stabilize the rule and later
(probably in the next minor release) stabilize the fixes together.
ntBre added a commit that referenced this pull request Sep 10, 2025
Summary
--

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule
until its fix is also ready for stabilization, but this is also the only
preview PTH rule, so I think it's okay to stabilize the rule and later
(probably in the next minor release) stabilize the fixes together.
ntBre added a commit that referenced this pull request Sep 10, 2025
Summary
--

Rule and test/snapshot updated, the docs look good

My one hesitation here is that we could hold off stabilizing the rule
until its fix is also ready for stabilization, but this is also the only
preview PTH rule, so I think it's okay to stabilize the rule and later
(probably in the next minor release) stabilize the fixes together.
dcreager added a commit that referenced this pull request Sep 10, 2025
* main: (26 commits)
  Ignore deprecated rules unless selected by exact code (#20167)
  Stabilize adding future import via config option (#20277)
  [`flake8-errmsg`] Stabilize extending `raw-string-in-exception` (`EM101`) to support byte strings (#20273)
  Stabilize the remaining Airflow rules (#20250)
  [`flake8-bugbear`] Stabilize support for non-context-manager calls in `assert-raises-exception` (`B017`) (#20274)
  [`flake8-commas`] Stabilize support for trailing comma checks in type parameter lists (`COM812`, `COM819`) (#20275)
  [`pygrep_hooks`] Stabilize using`AsyncMock` methods in `invalid-mock-access` (`PGH005`) (#20272)
  Stabilize new strategy for classifying imports as first party (#20268)
  [`pylint`] Stabilize ignoring `__init__.py` for `useless-import-alias` (`PLC0414`) (#20271)
  [`pylint`] Stabilize adding U+061C to `bidirectional-unicode` (`PLE2502`) (#20276)
  [`flake8-simplify`] Stabilize fix safety of `multiple-with-statements` (`SIM117`) (#20270)
  Stabilize `pytest-raises-ambiguous-pattern` (`RUF043`) (#20253)
  Stabilize `f-string-number-format` (`FURB116`) (#20247)
  [`pyupgrade`] Remove `non-pep604-isinstance` (`UP038`) (#19156)
  [`pandas-vet`] Remove `pandas-df-variable-name` (`PD901`) (#19223)
  Remove deprecated macOS config file discovery (#19210)
  Stabilize `redundant-none-literal` (`PYI061`) (#20236)
  Stabilize `generic-not-last-base-class` (`PYI059`) (#20246)
  Stabilize `useless-class-metaclass-type` (`UP050`) (#20230)
  Stabilize `os-symlink` (`PTH211`) (#20229)
  ...
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.

2 participants