Uniformize usage() and extra_usage() message ending for commands helper. (#8268)

# Description

Working on uniformizing the ending messages regarding methods usage()
and extra_usage(). This is related to the issue
https://github.com/nushell/nushell/issues/5066 after discussing it with
@jntrnr

# User-Facing Changes

None.

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
Jérémy Audiger
2023-03-01 06:33:02 +01:00
committed by GitHub
parent 644164fab3
commit a5c604c283
268 changed files with 278 additions and 278 deletions

View File

@ -16,7 +16,7 @@ impl Command for AppendDF {
}
fn usage(&self) -> &str {
"Appends a new dataframe"
"Appends a new dataframe."
}
fn signature(&self) -> Signature {

View File

@ -14,7 +14,7 @@ impl Command for ColumnsDF {
}
fn usage(&self) -> &str {
"Show dataframe columns"
"Show dataframe columns."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for DropDF {
}
fn usage(&self) -> &str {
"Creates a new dataframe by dropping the selected columns"
"Creates a new dataframe by dropping the selected columns."
}
fn signature(&self) -> Signature {

View File

@ -18,7 +18,7 @@ impl Command for DropDuplicates {
}
fn usage(&self) -> &str {
"Drops duplicate values in dataframe"
"Drops duplicate values in dataframe."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for DropNulls {
}
fn usage(&self) -> &str {
"Drops null values in dataframe"
"Drops null values in dataframe."
}
fn signature(&self) -> Signature {

View File

@ -14,7 +14,7 @@ impl Command for DataTypes {
}
fn usage(&self) -> &str {
"Show dataframe data types"
"Show dataframe data types."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for Dummies {
}
fn usage(&self) -> &str {
"Creates a new dataframe with dummy variables"
"Creates a new dataframe with dummy variables."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for FilterWith {
}
fn usage(&self) -> &str {
"Filters dataframe using a mask or expression as reference"
"Filters dataframe using a mask or expression as reference."
}
fn signature(&self) -> Signature {

View File

@ -18,7 +18,7 @@ impl Command for GetDF {
}
fn usage(&self) -> &str {
"Creates dataframe with the selected columns"
"Creates dataframe with the selected columns."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for LastDF {
}
fn usage(&self) -> &str {
"Creates new dataframe with tail rows or creates a last expression"
"Creates new dataframe with tail rows or creates a last expression."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ListDF {
}
fn usage(&self) -> &str {
"Lists stored dataframes"
"Lists stored dataframes."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for MeltDF {
}
fn usage(&self) -> &str {
"Unpivot a DataFrame from wide to long format"
"Unpivot a DataFrame from wide to long format."
}
fn signature(&self) -> Signature {

View File

@ -22,7 +22,7 @@ impl Command for OpenDataFrame {
}
fn usage(&self) -> &str {
"Opens csv, json, arrow, or parquet file to create dataframe"
"Opens csv, json, arrow, or parquet file to create dataframe."
}
fn signature(&self) -> Signature {

View File

@ -18,7 +18,7 @@ impl Command for RenameDF {
}
fn usage(&self) -> &str {
"Rename a dataframe column"
"Rename a dataframe column."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for SampleDF {
}
fn usage(&self) -> &str {
"Create sample dataframe"
"Create sample dataframe."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for ShapeDF {
}
fn usage(&self) -> &str {
"Shows column and row size for a dataframe"
"Shows column and row size for a dataframe."
}
fn signature(&self) -> Signature {

View File

@ -18,7 +18,7 @@ impl Command for SliceDF {
}
fn usage(&self) -> &str {
"Creates new dataframe from a slice of rows"
"Creates new dataframe from a slice of rows."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for TakeDF {
}
fn usage(&self) -> &str {
"Creates new dataframe using the given indices"
"Creates new dataframe using the given indices."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for ToArrow {
}
fn usage(&self) -> &str {
"Saves dataframe to arrow file"
"Saves dataframe to arrow file."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for ToCSV {
}
fn usage(&self) -> &str {
"Saves dataframe to csv file"
"Saves dataframe to csv file."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ToDataFrame {
}
fn usage(&self) -> &str {
"Converts a list, table or record into a dataframe"
"Converts a list, table or record into a dataframe."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ToNu {
}
fn usage(&self) -> &str {
"Converts a section of the dataframe into nushell Table"
"Converts a section of the dataframe into nushell Table."
}
fn signature(&self) -> Signature {

View File

@ -19,7 +19,7 @@ impl Command for ToParquet {
}
fn usage(&self) -> &str {
"Saves dataframe to parquet file"
"Saves dataframe to parquet file."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for WithColumn {
}
fn usage(&self) -> &str {
"Adds a series to the dataframe"
"Adds a series to the dataframe."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprAlias {
}
fn usage(&self) -> &str {
"Creates an alias expression"
"Creates an alias expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprArgWhere {
}
fn usage(&self) -> &str {
"Creates an expression that returns the arguments where expression is true"
"Creates an expression that returns the arguments where expression is true."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ExprAsNu {
}
fn usage(&self) -> &str {
"Convert expression into a nu value for access and exploration"
"Convert expression into a nu value for access and exploration."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprCol {
}
fn usage(&self) -> &str {
"Creates a named column expression"
"Creates a named column expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprConcatStr {
}
fn usage(&self) -> &str {
"Creates a concat string expression"
"Creates a concat string expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprIsIn {
}
fn usage(&self) -> &str {
"Creates an is-in expression"
"Creates an is-in expression."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ExprLit {
}
fn usage(&self) -> &str {
"Creates a literal expression"
"Creates a literal expression."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ExprOtherwise {
}
fn usage(&self) -> &str {
"completes a when expression"
"completes a when expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprQuantile {
}
fn usage(&self) -> &str {
"Aggregates the columns to the selected quantile"
"Aggregates the columns to the selected quantile."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ExprWhen {
}
fn usage(&self) -> &str {
"Creates and modifies a when expression"
"Creates and modifies a when expression."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for LazyAggregate {
}
fn usage(&self) -> &str {
"Performs a series of aggregations from a group-by"
"Performs a series of aggregations from a group-by."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyCollect {
}
fn usage(&self) -> &str {
"Collect lazy dataframe into eager dataframe"
"Collect lazy dataframe into eager dataframe."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyFetch {
}
fn usage(&self) -> &str {
"collects the lazyframe to the selected rows"
"collects the lazyframe to the selected rows."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for LazyFillNA {
}
fn usage(&self) -> &str {
"Replaces NaN values with the given expression"
"Replaces NaN values with the given expression."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for LazyFillNull {
}
fn usage(&self) -> &str {
"Replaces NULL values with the given expression"
"Replaces NULL values with the given expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyFilter {
}
fn usage(&self) -> &str {
"Filter dataframe based in expression"
"Filter dataframe based in expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ToLazyGroupBy {
}
fn usage(&self) -> &str {
"Creates a group-by object that can be used for other aggregations"
"Creates a group-by object that can be used for other aggregations."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyJoin {
}
fn usage(&self) -> &str {
"Joins a lazy frame with other lazy frame"
"Joins a lazy frame with other lazy frame."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyQuantile {
}
fn usage(&self) -> &str {
"Aggregates the columns to the selected quantile"
"Aggregates the columns to the selected quantile."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for LazySelect {
}
fn usage(&self) -> &str {
"Selects columns from lazyframe"
"Selects columns from lazyframe."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazySortBy {
}
fn usage(&self) -> &str {
"sorts a lazy dataframe based on expression(s)"
"sorts a lazy dataframe based on expression(s)."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for ToLazyFrame {
}
fn usage(&self) -> &str {
"Converts a dataframe into a lazy dataframe"
"Converts a dataframe into a lazy dataframe."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for AllFalse {
}
fn usage(&self) -> &str {
"Returns true if all values are false"
"Returns true if all values are false."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for AllTrue {
}
fn usage(&self) -> &str {
"Returns true if all values are true"
"Returns true if all values are true."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ArgMax {
}
fn usage(&self) -> &str {
"Return index for max value in series"
"Return index for max value in series."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -16,7 +16,7 @@ impl Command for ArgMin {
}
fn usage(&self) -> &str {
"Return index for min value in series"
"Return index for min value in series."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -49,7 +49,7 @@ impl Command for Cumulative {
}
fn usage(&self) -> &str {
"Cumulative calculation for a series"
"Cumulative calculation for a series."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetDay {
}
fn usage(&self) -> &str {
"Gets day from date"
"Gets day from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetHour {
}
fn usage(&self) -> &str {
"Gets hour from date"
"Gets hour from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetMinute {
}
fn usage(&self) -> &str {
"Gets minute from date"
"Gets minute from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetMonth {
}
fn usage(&self) -> &str {
"Gets month from date"
"Gets month from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetNanosecond {
}
fn usage(&self) -> &str {
"Gets nanosecond from date"
"Gets nanosecond from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetOrdinal {
}
fn usage(&self) -> &str {
"Gets ordinal from date"
"Gets ordinal from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetSecond {
}
fn usage(&self) -> &str {
"Gets second from date"
"Gets second from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetWeek {
}
fn usage(&self) -> &str {
"Gets week from date"
"Gets week from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetWeekDay {
}
fn usage(&self) -> &str {
"Gets weekday from date"
"Gets weekday from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for GetYear {
}
fn usage(&self) -> &str {
"Gets year from date"
"Gets year from date."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ArgSort {
}
fn usage(&self) -> &str {
"Returns indexes for a sorted series"
"Returns indexes for a sorted series."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -16,7 +16,7 @@ impl Command for ArgTrue {
}
fn usage(&self) -> &str {
"Returns indexes where values are true"
"Returns indexes where values are true."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -16,7 +16,7 @@ impl Command for ArgUnique {
}
fn usage(&self) -> &str {
"Returns indexes for unique values"
"Returns indexes for unique values."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -17,7 +17,7 @@ impl Command for SetWithIndex {
}
fn usage(&self) -> &str {
"Sets value in the given index"
"Sets value in the given index."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for IsDuplicated {
}
fn usage(&self) -> &str {
"Creates mask indicating duplicated values"
"Creates mask indicating duplicated values."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for IsIn {
}
fn usage(&self) -> &str {
"Checks if elements from a series are contained in right series"
"Checks if elements from a series are contained in right series."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for IsNotNull {
}
fn usage(&self) -> &str {
"Creates mask where value is not null"
"Creates mask where value is not null."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for IsNull {
}
fn usage(&self) -> &str {
"Creates mask where value is null"
"Creates mask where value is null."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for IsUnique {
}
fn usage(&self) -> &str {
"Creates mask indicating unique values"
"Creates mask indicating unique values."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for NotSeries {
}
fn usage(&self) -> &str {
"Inverts boolean mask"
"Inverts boolean mask."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for SetSeries {
}
fn usage(&self) -> &str {
"Sets value where given mask is true"
"Sets value where given mask is true."
}
fn signature(&self) -> Signature {

View File

@ -15,7 +15,7 @@ impl Command for NNull {
}
fn usage(&self) -> &str {
"Counts null values"
"Counts null values."
}
fn signature(&self) -> Signature {

View File

@ -14,7 +14,7 @@ impl Command for NUnique {
}
fn usage(&self) -> &str {
"Counts unique values"
"Counts unique values."
}
fn signature(&self) -> Signature {

View File

@ -52,7 +52,7 @@ impl Command for Rolling {
}
fn usage(&self) -> &str {
"Rolling calculation for a series"
"Rolling calculation for a series."
}
fn signature(&self) -> Signature {

View File

@ -18,7 +18,7 @@ impl Command for Shift {
}
fn usage(&self) -> &str {
"Shifts the values by a given period"
"Shifts the values by a given period."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for Concatenate {
}
fn usage(&self) -> &str {
"Concatenates strings with other array"
"Concatenates strings with other array."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for Contains {
}
fn usage(&self) -> &str {
"Checks if a pattern is contained in a string"
"Checks if a pattern is contained in a string."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for Replace {
}
fn usage(&self) -> &str {
"Replace the leftmost (sub)string by a regex pattern"
"Replace the leftmost (sub)string by a regex pattern."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for ReplaceAll {
}
fn usage(&self) -> &str {
"Replace all (sub)strings by a regex pattern"
"Replace all (sub)strings by a regex pattern."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for StrLengths {
}
fn usage(&self) -> &str {
"Get lengths of all strings"
"Get lengths of all strings."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for StrSlice {
}
fn usage(&self) -> &str {
"Slices the string from the start position until the selected length"
"Slices the string from the start position until the selected length."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for StrFTime {
}
fn usage(&self) -> &str {
"Formats date based on string rule"
"Formats date based on string rule."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ToLowerCase {
}
fn usage(&self) -> &str {
"Lowercase the strings in the column"
"Lowercase the strings in the column."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for ToUpperCase {
}
fn usage(&self) -> &str {
"Uppercase the strings in the column"
"Uppercase the strings in the column."
}
fn search_terms(&self) -> Vec<&str> {

View File

@ -19,7 +19,7 @@ impl Command for Unique {
}
fn usage(&self) -> &str {
"Returns unique values from a dataframe"
"Returns unique values from a dataframe."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for ValueCount {
}
fn usage(&self) -> &str {
"Returns a dataframe with the counts for unique values in series"
"Returns a dataframe with the counts for unique values in series."
}
fn signature(&self) -> Signature {