mirror of
https://github.com/nushell/nushell.git
synced 2025-07-07 18:07:02 +02:00
Update internal use of decimal
to float
(#10333)
# Description We made the decision that our floating point type should be referred to as `float` over `decimal`. Commands were updated by #9979 and #10320 Now make the internal codebase consistent in referring to this data type as `float`. Work for #10332 # User-Facing Changes `decimal` has been removed as a type name/symbol. Instead of ```nushell def foo [bar: decimal] decimal -> decimal {} ``` use ```nushell def foo [bar: float] float -> float {} ``` Potential effect of `SyntaxShape`'s `Display` implementation now also referring to `float` instead of `decimal` # Details - Rename `SyntaxShape::Decimal` to `Float` - Update `Display for SyntaxShape` to `float` - Update error message + fn name in dataframe code - Fix docs in command examples - Rename tests that are float specific - Update doccomment on `SyntaxShape` - Update comment in script # Tests + Formatting Updates the names of some tests
This commit is contained in:
committed by
GitHub
parent
5bd7300cd5
commit
bbf0b45c59
@ -2709,7 +2709,7 @@ pub fn parse_shape_name(
|
||||
b"duration" => SyntaxShape::Duration,
|
||||
b"error" => SyntaxShape::Error,
|
||||
b"expr" => SyntaxShape::Expression,
|
||||
b"float" | b"decimal" => SyntaxShape::Decimal,
|
||||
b"float" => SyntaxShape::Float,
|
||||
b"filesize" => SyntaxShape::Filesize,
|
||||
b"full-cell-path" => SyntaxShape::FullCellPath,
|
||||
b"glob" => SyntaxShape::GlobPattern,
|
||||
@ -4654,7 +4654,7 @@ pub fn parse_value(
|
||||
expression
|
||||
}
|
||||
SyntaxShape::Number => parse_number(working_set, span),
|
||||
SyntaxShape::Decimal => parse_float(working_set, span),
|
||||
SyntaxShape::Float => parse_float(working_set, span),
|
||||
SyntaxShape::Int => parse_int(working_set, span),
|
||||
SyntaxShape::Duration => parse_duration(working_set, span),
|
||||
SyntaxShape::DateTime => parse_datetime(working_set, span),
|
||||
|
Reference in New Issue
Block a user