-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
MBS-11805 (I): Flow types and refactoring for guess case code (first half) #2182
Merged
mwiencek
merged 34 commits into
metabrainz:master
from
reosarevok:guess-case-refactoring
Aug 9, 2021
Merged
MBS-11805 (I): Flow types and refactoring for guess case code (first half) #2182
mwiencek
merged 34 commits into
metabrainz:master
from
reosarevok:guess-case-refactoring
Aug 9, 2021
Conversation
This file contains 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
Context was missing a lot of stuff that is actually added to it later. This expands it to support all those elements, but does not (for now) rename resetContext, even though that only resets *part* of the context.
reosarevok
force-pushed
the
guess-case-refactoring
branch
from
July 23, 2021 11:42
e1a60ae
to
9bb2de8
Compare
reosarevok
changed the title
[WIP] Flow types and small refactorings for guess case code
MBS-11805: [WIP] Flow types and small refactorings for guess case code
Jul 23, 2021
gc is still not properly typed since that requires typing all of Input, Output and the modes. Clarify is, os, lc, uc to actual words.
reosarevok
force-pushed
the
guess-case-refactoring
branch
2 times, most recently
from
August 2, 2021 18:10
647f963
to
568a80b
Compare
This will make it easier to type and use
It seems a lot easier to just check wordList.length, which avoids us having to update the stored wordListLength every time we change wordList
reosarevok
force-pushed
the
guess-case-refactoring
branch
from
August 3, 2021 05:37
8765100
to
ff43ec3
Compare
This doesn't actually return anything, it just drops the last word. Which is what the function name already says.
This reads more clearly if we just step out of it if null first.
This will make it easier to type and use
This is always applied in all our usages, so config.apply is useless. Also, the return is never used, so this doesn't need to return anything.
This will be needed for easy flow typing, plus flow no longer allows this inside objects.
reosarevok
force-pushed
the
guess-case-refactoring
branch
from
August 4, 2021 17:54
58b9a02
to
1e4fc3c
Compare
CFG_KEEP_UPPERCASED can probably change so keeping it writable for now.
reosarevok
force-pushed
the
guess-case-refactoring
branch
2 times, most recently
from
August 6, 2021 11:51
aaf73a8
to
1d0a7a2
Compare
reosarevok
changed the title
MBS-11805: [WIP] Flow types and small refactorings for guess case code
MBS-11805: [WIP] Flow types and refactoring for guess case code
Aug 6, 2021
reosarevok
force-pushed
the
guess-case-refactoring
branch
from
August 6, 2021 12:06
1d0a7a2
to
7411504
Compare
mwiencek
changed the title
MBS-11805: [WIP] Flow types and refactoring for guess case code
MBS-11805: Flow types and refactoring for guess case code
Aug 6, 2021
mwiencek
reviewed
Aug 6, 2021
gc.mode needs to be dropped to avoid recursion, but in any case, it seems more sensible to just calculate it based on the currently set modeName, rather than passing it around.
reosarevok
force-pushed
the
guess-case-refactoring
branch
from
August 7, 2021 06:54
7411504
to
22aa33b
Compare
reosarevok
changed the title
MBS-11805: Flow types and refactoring for guess case code
MBS-11805 (I): Flow types and refactoring for guess case code (first half)
Aug 7, 2021
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.
Implement MBS-11805
The main goal of this is to add flow types to guess case, and fix any issues that surfaces, which I expect will be a bunch. Also fixing smaller eslint issues and whatnot as I see them.