Skip to content

Commit

Permalink
Readability Fixes r2 (#3556)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrussell committed Jun 1, 2022
1 parent 91d02cd commit 1c7e582
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion polars/polars-core/src/series/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ impl Series {
Float64 => a.f64().unwrap().abs().into_series(),
dt => {
return Err(PolarsError::InvalidOperation(
format!("abs not supportedd for series of type {:?}", dt).into(),
format!("abs not supported for series of type {:?}", dt).into(),
));
}
};
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-core/src/series/ops/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Series {
}

#[cfg_attr(docsrs, doc(cfg(feature = "round_series")))]
/// Ceil underlying floating point array to the heighest integers smaller or equal to the float value.
/// Ceil underlying floating point array to the highest integers smaller or equal to the float value.
pub fn ceil(&self) -> Result<Self> {
if let Ok(ca) = self.f32() {
let s = ca.apply(|val| val.ceil()).into_series();
Expand All @@ -59,7 +59,7 @@ impl Series {
}

#[cfg_attr(docsrs, doc(cfg(feature = "round_series")))]
/// Ceil underlying floating point array to the heighest integers smaller or equal to the float value.
/// Ceil underlying floating point array to the highest integers smaller or equal to the float value.
pub fn clip(&self, min: f64, max: f64) -> Result<Self> {
if let Ok(ca) = self.f32() {
let min = min as f32;
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-io/src/csv_core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ fn decompress_impl<R: Read>(
let chunk_size = 4096;
Some(match n_rows {
None => {
// decompression will likely be an order of maginitude larger
// decompression will likely be an order of magnitude larger
let mut out = Vec::with_capacity(bytes.len() * 10);
decoder.read_to_end(&mut out).ok()?;
out
Expand All @@ -458,7 +458,7 @@ fn decompress_impl<R: Read>(
if read == 0 {
break;
}
// now that we have enough, we compute the number of fields (also takes enmbedding into account)
// now that we have enough, we compute the number of fields (also takes embedding into account)
expected_fields = SplitFields::new(&out, delimiter, quote_char)
.into_iter()
.count();
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-io/src/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl IpcWriterOption {
self
}

/// Set the extention. Defaults to ".ipc".
/// Set the extension. Defaults to ".ipc".
pub fn with_extension(mut self, extension: PathBuf) -> Self {
self.extension = extension;
self
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-io/src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ where
}

/// Write the parquet file in parallel (default).
pub fn with_parallel(mut self, pararell: bool) -> Self {
self.parallel = pararell;
pub fn with_parallel(mut self, parallel: bool) -> Self {
self.parallel = parallel;
self
}

Expand Down
8 changes: 4 additions & 4 deletions polars/polars-lazy/src/dsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl WhenThenThen {
// ) _| _|
//
// by iterating lifo we first create
// `inner` and then assighn that to `otherwise`,
// `inner` and then assign that to `otherwise`,
// which will be used in the next layer `outer`
//

Expand Down Expand Up @@ -479,7 +479,7 @@ impl Expr {
.with_fmt("arg_unique")
}

/// Get the index value that has the minumum value
/// Get the index value that has the minimum value
pub fn arg_min(self) -> Self {
let options = FunctionOptions {
collect_groups: ApplyOptions::ApplyGroups,
Expand Down Expand Up @@ -907,7 +907,7 @@ impl Expr {
.with_fmt("cummax")
}

/// Get the product aggreagtion of an expresion
/// Get the product aggregation of an expression
#[cfg_attr(docsrs, doc(cfg(feature = "product")))]
pub fn product(self) -> Self {
self.apply(
Expand Down Expand Up @@ -958,7 +958,7 @@ impl Expr {
.with_fmt("floor")
}

/// Ceil underlying floating point array to the heighest integers smaller or equal to the float value.
/// Ceil underlying floating point array to the highest integers smaller or equal to the float value.
#[cfg(feature = "round_series")]
#[cfg_attr(docsrs, doc(cfg(feature = "round_series")))]
pub fn ceil(self) -> Self {
Expand Down

0 comments on commit 1c7e582

Please sign in to comment.