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

re-enable strict typing in two files #548

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

yob
Copy link
Owner

@yob yob commented Jan 13, 2025

After a recent upgrade to sorbet (#546) I found that I was able to re-enable strict typing here.

It was disabled in #513 because sorbet wasn't finding the type annotation in the rbi file for some constants. It's still inconsistent (for example, I wasn't able to change the cmap.rb back to strict), but these ones are OK.

The constants where sorbet ignores the type definition in the rbi file are all Hashes 🤔

After a recent upgrade to sorbet (#546) I found that I was able to
re-enable strict typing here.

It was disabled in #513 because sorbet wasn't finding the type
annotation in the rbi file for some constants. It's still inconsisent
(for example, I wasn't able to change the cmap.rb back to strict), but
these ones are OK.
@@ -52,7 +52,7 @@ class Buffer
CR = "\r"
LF = "\n"
CRLF = "\r\n"
WHITE_SPACE = [LF, CR, ' ']
WHITE_SPACE = ["\n", "\r", ' ']
Copy link
Owner Author

Choose a reason for hiding this comment

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

sorbet ignored the type definition in the rbi file until I changed this to use literals and not reference the earlier constants

@yob yob merged commit 5127781 into main Jan 13, 2025
1 check passed
@yob yob deleted the restore-some-strict-typing branch January 13, 2025 23:43
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.

1 participant