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

Fix AST safety check false negative #4270

Merged
merged 8 commits into from Mar 10, 2024
Merged

Conversation

JelleZijlstra
Copy link
Collaborator

Fixes #4268

Previously we would allow whitespace changes in all strings, now
only in docstrings.

Copy link

github-actions bot commented Mar 9, 2024

diff-shades reports zero changes comparing this PR (2a65077) to main (f03ee11).


What is this? | Workflow run | diff-shades documentation

@JelleZijlstra
Copy link
Collaborator Author

Seems like we got unlucky and someone added 3.12+ syntax to a diff-shades project just two hours ago (koaning/scikit-lego@64485a9#diff-db41f509a7991f7b7579a72fe7bdba315b5ab82bdde2f237c6a53d03396c0081R97 line 97).

JelleZijlstra added a commit to ichard26/diff-shades that referenced this pull request Mar 9, 2024
JelleZijlstra added a commit to ichard26/diff-shades that referenced this pull request Mar 9, 2024
@JelleZijlstra JelleZijlstra reopened this Mar 9, 2024
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, two small things

src/black/parsing.py Outdated Show resolved Hide resolved
tests/test_black.py Outdated Show resolved Hide resolved
JelleZijlstra and others added 2 commits March 9, 2024 17:32
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@JelleZijlstra JelleZijlstra merged commit 6af7d11 into psf:main Mar 10, 2024
45 checks passed
@JelleZijlstra JelleZijlstra deleted the astsafe branch March 10, 2024 01:42
sumezulike pushed a commit to sumezulike/black that referenced this pull request Mar 10, 2024
Fixes psf#4268

Previously we would allow whitespace changes in all strings, now
only in docstrings.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja added a commit to hauntsaninja/black that referenced this pull request Mar 22, 2024
hauntsaninja added a commit to hauntsaninja/black that referenced this pull request Mar 22, 2024
hauntsaninja added a commit to hauntsaninja/black that referenced this pull request Mar 22, 2024
JelleZijlstra pushed a commit that referenced this pull request Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AST safety check fails to catch incorrect f-string change
2 participants