Skip to content

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Apr 5, 2025

Summary

This is more "because we can" than something we need.

But since we're already building an "almost IDE"

Test Plan

Screen.Recording.2025-04-05.at.10.12.38.mov

@MichaReiser MichaReiser added playground A playground-specific issue ty Multi-file analysis & type inference labels Apr 5, 2025
@MichaReiser MichaReiser marked this pull request as ready for review April 5, 2025 08:13
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2025

mypy_primer results

No ecosystem changes detected ✅

}

const formatted = this.props.current.workspace.format(fileHandle);
if (formatted !== model.getValue()) {
Copy link
Member Author

@MichaReiser MichaReiser Apr 5, 2025

Choose a reason for hiding this comment

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

We could be more fancy and change format to return a vec of text edits. I don't think we need this just yet (also comes at the cost of requiring a diff library)

@MichaReiser MichaReiser requested a review from Copilot April 5, 2025 08:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

playground/knot/src/Editor/Editor.tsx:366

  • In the provideDocumentFormattingEdits implementation, consider explicitly returning null (instead of implicitly returning undefined) when no file is selected, to ensure consistent return types as expected by the formatting provider.
if (this.props.current.files.selected == null) {

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser force-pushed the micha/playground-format branch 6 times, most recently from 0c57690 to 8b60e4b Compare April 5, 2025 14:31
@carljm carljm removed their request for review April 6, 2025 19:52
@MichaReiser MichaReiser force-pushed the micha/playground-format branch from 1f50f57 to 4999cc8 Compare April 7, 2025 07:16
@MichaReiser MichaReiser force-pushed the micha/playground-format branch from 54149c1 to a9f5d06 Compare April 7, 2025 07:20
@MichaReiser MichaReiser merged commit 3150812 into main Apr 7, 2025
22 checks passed
@MichaReiser MichaReiser deleted the micha/playground-format branch April 7, 2025 07:26
dcreager added a commit that referenced this pull request Apr 7, 2025
* main: (42 commits)
  [playground] New default program (#17277)
  [red-knot] Add `--python-platform` CLI option (#17284)
  [red-knot] Allow ellipsis default params in stub functions (#17243)
  [red-knot] Fix stale syntax errors in playground (#17280)
  Update Rust crate clap to v4.5.35 (#17273)
  Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061)
  [ci] Fix pattern for code changes (#17275)
  [`airflow`] Update oudated `AIR301`, `AIR302` rules (#17123)
  [docs] fix formatting of "See Style Guide" link (#17272)
  [red-knot] Support stub packages (#17204)
  ruff_annotate_snippets: address unused code warnings
  [red-knot] Add a couple more tests for `*` imports (#17270)
  [red-knot] Add 'Format document' to playground (#17217)
  Update actions/setup-node action to v4.3.0 (#17259)
  Update actions/upload-artifact action to v4.6.2 (#17261)
  Update actions/download-artifact action to v4.2.1 (#17258)
  Update actions/setup-python action to v5.5.0 (#17260)
  Update actions/cache action to v4.2.3 (#17256)
  Update Swatinem/rust-cache action to v2.7.8 (#17255)
  Update actions/checkout action to v4.2.2 (#17257)
  ...
dcreager added a commit that referenced this pull request Apr 8, 2025
* main: (222 commits)
  [playground] New default program (#17277)
  [red-knot] Add `--python-platform` CLI option (#17284)
  [red-knot] Allow ellipsis default params in stub functions (#17243)
  [red-knot] Fix stale syntax errors in playground (#17280)
  Update Rust crate clap to v4.5.35 (#17273)
  Fix RUF100 to detect unused file-level noqa directives with specific codes (#17042) (#17061)
  [ci] Fix pattern for code changes (#17275)
  [`airflow`] Update oudated `AIR301`, `AIR302` rules (#17123)
  [docs] fix formatting of "See Style Guide" link (#17272)
  [red-knot] Support stub packages (#17204)
  ruff_annotate_snippets: address unused code warnings
  [red-knot] Add a couple more tests for `*` imports (#17270)
  [red-knot] Add 'Format document' to playground (#17217)
  Update actions/setup-node action to v4.3.0 (#17259)
  Update actions/upload-artifact action to v4.6.2 (#17261)
  Update actions/download-artifact action to v4.2.1 (#17258)
  Update actions/setup-python action to v5.5.0 (#17260)
  Update actions/cache action to v4.2.3 (#17256)
  Update Swatinem/rust-cache action to v2.7.8 (#17255)
  Update actions/checkout action to v4.2.2 (#17257)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

playground A playground-specific issue ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants