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

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

Merged
merged 1 commit into from
Jan 29, 2024

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
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

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
5 checks passed
@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.

None yet

2 participants