Skip to content

Comments

[flake8-pyi] Mark unaliased-collections-abc-set-import fix as safe#9679

Merged
charliermarsh merged 1 commit intorelease/0.2.0from
charlie/PYI025
Jan 29, 2024
Merged

[flake8-pyi] Mark unaliased-collections-abc-set-import fix as safe#9679
charliermarsh merged 1 commit intorelease/0.2.0from
charlie/PYI025

Conversation

@charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jan 29, 2024

Summary

Prompted by #8482 (comment). The rename is only unsafe when the symbol is exported, so we can narrow the conditions.

@charliermarsh charliermarsh added this to the v0.2.0 milestone Jan 29, 2024
@charliermarsh charliermarsh added fixes Related to suggested fixes for violations preview Related to preview mode features labels Jan 29, 2024
@charliermarsh charliermarsh requested a review from zanieb January 29, 2024 17:30
@charliermarsh
Copy link
Member Author

For 0.2.

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

I guess it's unsafe if the name is being exported?

@charliermarsh
Copy link
Member Author

That's... true

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

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

python/typeshed (+1 -0 violations, +0 -0 fixes)

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

+ stubs/setuptools/pkg_resources/_vendored_packaging/specifiers.pyi:10:22: PYI001 Name of private `TypeVar` must start with `_`

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PYI001 1 1 0 0 0

@charliermarsh charliermarsh changed the base branch from main to release/0.2.0 January 29, 2024 17:54
@charliermarsh
Copy link
Member Author

I marked it as safe, unless it's at the top level.

@charliermarsh charliermarsh merged commit 6adb5f8 into release/0.2.0 Jan 29, 2024
@charliermarsh charliermarsh deleted the charlie/PYI025 branch January 29, 2024 17:56
@zanieb zanieb mentioned this pull request Jan 29, 2024
zanieb pushed a commit that referenced this pull request Jan 29, 2024
#9679)

## Summary

Prompted by
#8482 (comment).
The rename is only unsafe when the symbol is exported, so we can narrow
the conditions.
zanieb pushed a commit that referenced this pull request Jan 30, 2024
#9679)

## Summary

Prompted by
#8482 (comment).
The rename is only unsafe when the symbol is exported, so we can narrow
the conditions.
zanieb pushed a commit that referenced this pull request Feb 1, 2024
#9679)

## Summary

Prompted by
#8482 (comment).
The rename is only unsafe when the symbol is exported, so we can narrow
the conditions.
zanieb pushed a commit that referenced this pull request Feb 1, 2024
#9679)

## Summary

Prompted by
#8482 (comment).
The rename is only unsafe when the symbol is exported, so we can narrow
the conditions.
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