-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Chore] Fix typos, and organize functions for style #1087
Open
miguelcsx
wants to merge
1
commit into
BoundaryML:canary
Choose a base branch
from
miguelcsx:chore/typos
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
2 changes: 0 additions & 2 deletions
2
engine/baml-lib/jsonish/src/deserializer/coercer/array_helper.rs
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
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -32,7 +32,7 @@ pub(super) fn coerce_optional( | |||||
Some(v) => match inner.coerce(ctx, optional_target, Some(v)) { | ||||||
Ok(v) => Ok(v), | ||||||
Err(e) => { | ||||||
flags.add_flag(Flag::DefaultButHadUnparseableValue(e)); | ||||||
flags.add_flag(Flag::DefaultButHadUnparsableValue(e)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
both "parseable" and "parsable" are valid spellings, but the former will show up when grepping/searching for "parse" |
||||||
Ok(BamlValueWithFlags::Null(flags)) | ||||||
} | ||||||
}, | ||||||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ pub enum Flag { | |
ObjectFromMarkdown(i32), | ||
ObjectFromFixedJson(Vec<crate::jsonish::Fixes>), | ||
|
||
DefaultButHadUnparseableValue(ParsingError), | ||
DefaultButHadUnparsableValue(ParsingError), | ||
ObjectToString(crate::jsonish::Value), | ||
ObjectToPrimitive(crate::jsonish::Value), | ||
ObjectToMap(crate::jsonish::Value), | ||
|
@@ -20,7 +20,7 @@ pub enum Flag { | |
|
||
JsonToString(crate::jsonish::Value), | ||
ImpliedKey(String), | ||
InferedObject(crate::jsonish::Value), | ||
InferredObject(crate::jsonish::Value), | ||
|
||
// Values here are all the possible matches. | ||
FirstMatch(usize, Vec<Result<BamlValueWithFlags, ParsingError>>), | ||
|
@@ -32,15 +32,15 @@ pub enum Flag { | |
DefaultButHadValue(crate::jsonish::Value), | ||
OptionalDefaultFromNoValue, | ||
|
||
// String -> X convertions. | ||
// String -> X conversions. | ||
StringToBool(String), | ||
StringToNull(String), | ||
StringToChar(String), | ||
|
||
// Number -> X convertions. | ||
// Number -> X conversions. | ||
FloatToInt(f64), | ||
|
||
// X -> Object convertions. | ||
// X -> Object conversions. | ||
NoFields(Option<crate::jsonish::Value>), | ||
} | ||
|
||
|
@@ -77,7 +77,7 @@ impl DeserializerConditions { | |
} | ||
Flag::JsonToString(_) => None, | ||
Flag::ImpliedKey(_) => None, | ||
Flag::InferedObject(_) => None, | ||
Flag::InferredObject(_) => None, | ||
Flag::FirstMatch(_idx, _) => None, | ||
Flag::StrMatchOneFromMany(_matches) => None, | ||
Flag::DefaultFromNoValue => None, | ||
|
@@ -89,7 +89,7 @@ impl DeserializerConditions { | |
Flag::FloatToInt(_) => None, | ||
Flag::NoFields(_) => None, | ||
Flag::UnionMatch(_idx, _) => None, | ||
Flag::DefaultButHadUnparseableValue(e) => Some(e.clone()), | ||
Flag::DefaultButHadUnparsableValue(e) => Some(e.clone()), | ||
}) | ||
.collect::<Vec<_>>() | ||
} | ||
|
@@ -119,8 +119,8 @@ impl std::fmt::Display for DeserializerConditions { | |
impl std::fmt::Display for Flag { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
Flag::InferedObject(value) => { | ||
write!(f, "Infered object from: {}", value.r#type())?; | ||
Flag::InferredObject(value) => { | ||
write!(f, "Inferred object from: {}", value.r#type())?; | ||
} | ||
Flag::OptionalDefaultFromNoValue => { | ||
write!(f, "Optional Default value")?; | ||
|
@@ -165,8 +165,8 @@ impl std::fmt::Display for Flag { | |
writeln!(f, "Item {}: {}", idx, value)?; | ||
} | ||
} | ||
Flag::DefaultButHadUnparseableValue(value) => { | ||
write!(f, "Null but had unparseable value")?; | ||
Flag::DefaultButHadUnparsableValue(value) => { | ||
write!(f, "Null but had unparsable value")?; | ||
Comment on lines
+168
to
+169
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unparseable |
||
writeln!(f, "----RAW----")?; | ||
writeln!(f, "{}", value)?; | ||
writeln!(f, "-----------")?; | ||
|
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"unioned" is technically an invalid word but is deliberately used here to reference type unions