Skip to content

Conversation

@botantony
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

Part of #17297

Copilot AI review requested due to automatic review settings December 20, 2025 17:16
Copy link
Contributor

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.

Pull request overview

This PR upgrades the type strictness level from typed: true to typed: strict for the Library/Homebrew/patch.rb file as part of the gradual migration to stricter typing (#17297). The changes add comprehensive Sorbet type signatures throughout the file and remove tests that are no longer applicable due to the type system enforcing constraints that were previously tested manually.

  • Added Sorbet type signatures to all methods and instance variables
  • Marked EmbeddedPatch as abstract with proper abstract method declarations
  • Removed error handling for invalid input types that the type system now prevents
  • Removed tests for error cases that are now type-level guarantees and for the abstract EmbeddedPatch class that can no longer be instantiated directly

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Library/Homebrew/patch.rb Upgraded from typed: true to typed: strict, added comprehensive type signatures for methods and instance variables, marked EmbeddedPatch as abstract, and removed runtime error handling for type-level constraints
Library/Homebrew/test/patch_spec.rb Removed tests for runtime type validation errors (now prevented by type system) and removed tests for abstract EmbeddedPatch class instantiation (no longer possible)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@botantony botantony force-pushed the patch-typed-strict branch 2 times, most recently from 717f2d6 to 494eead Compare December 20, 2025 17:35
Signed-off-by: botantony <antonsm21@gmail.com>
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good so far, thanks!

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.

3 participants