Skip to content

Comments

[flake8-use-pathlib] Catch redundant joins in PTH201 and avoid syntax errors#15177

Merged
charliermarsh merged 2 commits intoastral-sh:mainfrom
InSyncWithFoo:PTH201
Dec 30, 2024
Merged

[flake8-use-pathlib] Catch redundant joins in PTH201 and avoid syntax errors#15177
charliermarsh merged 2 commits intoastral-sh:mainfrom
InSyncWithFoo:PTH201

Conversation

@InSyncWithFoo
Copy link
Contributor

@InSyncWithFoo InSyncWithFoo commented Dec 29, 2024

Summary

Resolves #10453, resolves #15165.

Test Plan

cargo nextest run and cargo insta test.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Dec 30, 2024
@charliermarsh charliermarsh changed the title [flake8-use-pathlib] Better fixes (PTH201) [flake8-use-pathlib] Catch redundant joins in PTH201 and avoid syntax errors Dec 30, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) December 30, 2024 03:27
@charliermarsh charliermarsh merged commit 901b7dd into astral-sh:main Dec 30, 2024
20 checks passed
@InSyncWithFoo InSyncWithFoo deleted the PTH201 branch December 30, 2024 03:32
dcreager added a commit that referenced this pull request Dec 30, 2024
* main:
  Add all PEP-585 names to UP006 rule (#5454)
  [`flake8-simplify`] More precise inference for dictionaries (`SIM300`) (#15164)
  `@no_type_check` support (#15122)
  Visit PEP 764 inline `TypedDict`s' keys as non-type-expressions (#15073)
  [red-knot] Add diagnostic for invalid unpacking (#15086)
  [`flake8-use-pathlib`] Catch redundant joins in `PTH201` and avoid syntax errors (#15177)
  Update Rust crate glob to v0.3.2 (#15185)
  Update astral-sh/setup-uv action to v5 (#15193)
  Update dependency mdformat-mkdocs to v4.1.1 (#15192)
  Update Rust crate serde_with to v3.12.0 (#15191)
  Update NPM Development dependencies (#15190)
  Update pre-commit hook rhysd/actionlint to v1.7.5 (#15189)
  Update Rust crate syn to v2.0.93 (#15188)
  Update Rust crate serde to v1.0.217 (#15187)
  Update Rust crate quote to v1.0.38 (#15186)
  Update Rust crate compact_str to v0.8.1 (#15184)
  [`flake8-type-checking`] Disable TC006 & TC007 in stub files (#15179)
  Test explicit shadowing involving `def`s (#15174)
  Fix typo in `NameImport.qualified_name` docstring (#15170)
  [airflow]: extend names moved from core to provider (AIR303) (#15159)
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.

PTH201 fix does not consider trailing comma PTH201 does not report redundant joins

2 participants