Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades three cask DSL files from typed: true to typed: strict Sorbet type checking, adding comprehensive type annotations to satisfy stricter type requirements.
- Adds explicit type signatures for methods and instance variables across version, depends_on, and container DSL classes
- Converts implicit type inference to explicit T.let declarations for constants and instance variables
- Fixes a potential bug in
invalid_charactersmethod by adding explicit.to_sconversion
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Library/Homebrew/cask/dsl/version.rb | Upgraded to strict typing with method signatures, T.let for DIVIDERS constant, and explicit type conversions |
| Library/Homebrew/cask/dsl/depends_on.rb | Upgraded to strict typing with detailed method signatures, converted attr_readers to methods with lazy initialization, and T.let annotations |
| Library/Homebrew/cask/dsl/container.rb | Upgraded to strict typing with method signatures and T.let annotations for instance variables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7c329ea to
09c12b3
Compare
MikeMcQuaid
reviewed
Jan 8, 2026
MikeMcQuaid
approved these changes
Jan 8, 2026
MikeMcQuaid
approved these changes
Jan 8, 2026
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks good thanks @botantony!
17b7516 to
151867c
Compare
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.
brew lgtm(style, typechecking and tests) with your changes locally?Part of #17297