[ty] Reject renaming files to start with slash in Playground#20666
Merged
MichaReiser merged 1 commit intoastral-sh:mainfrom Oct 1, 2025
Merged
[ty] Reject renaming files to start with slash in Playground#20666MichaReiser merged 1 commit intoastral-sh:mainfrom
ty] Reject renaming files to start with slash in Playground#20666MichaReiser merged 1 commit intoastral-sh:mainfrom
Conversation
c1c0f57 to
93be831
Compare
MichaReiser
reviewed
Oct 1, 2025
| newName: string, | ||
| ) => { | ||
| if (newName.startsWith("/")) { | ||
| setError("File names cannot start with '/'."); |
Member
There was a problem hiding this comment.
Does the error message get cleared at some point?
Contributor
Author
There was a problem hiding this comment.
As shown in the video, the error message disappears as soon as you type anything. Actions like creating a file don’t dismiss it, and this behavior is the same for other error messages as well.
2025-10-01.201751.mp4
MichaReiser
approved these changes
Oct 1, 2025
dcreager
added a commit
that referenced
this pull request
Oct 3, 2025
* origin/main: [`flake8-bugbear`] Include certain guaranteed-mutable expressions: tuples, generators, and assignment expressions (`B006`) (#20024) [`flake8-comprehensions`] Clarify fix safety documentation (`C413`) (#20640) [ty] improve base conda distinction from child conda (#20675) [`ruff`] Extend FA102 with listed PEP 585-compatible APIs (#20659) [`ruff`] Handle argfile expansion errors gracefully (#20691) [`flynt`] Fix f-string quoting for mixed quote joiners (`FLY002`) (#20662) [ty] Fix file root matching for `/` [ruff,ty] Enable tracing's `log` feature [`flake8-annotations`] Fix return type annotations to handle shadowed builtin symbols (`ANN201`, `ANN202`, `ANN204`, `ANN205`, `ANN206`) (#20612) Bump 0.13.3 (#20685) Update benchmarking CI for cargo-codspeed v4 (#20686) [ty] Support single-starred argument for overload call (#20223) [ty] `~T` should never be assignable to `T` (#20606) [`pylint`] Clarify fix safety to include left-hand hashability (`PLR6201`) (#20518) [ty] No union with `Unknown` for module-global symbols (#20664) [`ty`] Reject renaming files to start with slash in Playground (#20666) [ty] Enums: allow multiple aliases to point to the same member (#20669)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes astral-sh/ty#1282
Block renaming to names starting with
/, surfacing a clear error instead of crashing the playground.Test Plan
2025-10-01.184254.mp4