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

Add typing for Cask#url and fix detected issues #18139

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Aug 23, 2024

Most runtime TypeErrors indicate we have failed to type things correctly so that those issues can be detected statically (typically due to T.untyped).

This PR fixes this error:

Error: exception while auditing betterdisplay: Parameter 'url': Expected type String, got type Cask::URL with value #<Cask::URL::DSL:0x00000001...lay/", :user_agent=>:default}>
Caller: /opt/homebrew/Library/Homebrew/cask/audit.rb:768
Definition: /opt/homebrew/Library/Homebrew/utils/shared_audits.rb:187 (SharedAudits.github_tag_from_url)

And also fixes the underlying issue so that this issue can be detected in the future via brew typecheck

@Bo98 Bo98 changed the title Add typing for Cask#url and fix detected issues Add typing for Cask#url and fix detected issues Aug 23, 2024
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.

Thanks @Bo98!

@MikeMcQuaid MikeMcQuaid enabled auto-merge August 23, 2024 15:45
@MikeMcQuaid MikeMcQuaid merged commit c61b255 into master Aug 23, 2024
24 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask-url-type branch August 23, 2024 15:55
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.

2 participants