Skip to content

Commit

Permalink
Tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjkuson committed Nov 27, 2023
1 parent 6bf0008 commit 3e64f5d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions crates/ruff_linter/src/rules/refurb/rules/redundant_log_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,31 @@ use crate::importer::ImportRequest;
/// redundant.
///
/// Instead of passing 2 or 10 as the base, use `math.log2` or `math.log10`
/// respectively. This is more readable, precise, and efficient.
/// respectively. This is more readable, accurate, and efficient.
///
/// ## Example
/// ```python
/// import math
///
/// math.log(2, 2)
/// math.log(2, 10)
/// math.log(2, math.e)
/// math.log(3, 2)
/// math.log(3, 10)
/// math.log(3, math.e)
/// ```
///
/// Use instead:
/// ```python
/// import math
///
/// math.log2(2)
/// math.log10(2)
/// math.log(2)
/// math.log2(3)
/// math.log10(3)
/// math.log(3)
/// ```
///
/// ## References
/// - [Python documentation: `math.log`](https://docs.python.org/3/library/math.html#math.log)
/// - [Python documentation: `math.log2`](https://docs.python.org/3/library/math.html#math.log2)
/// - [Python documentation: `math.log10`](https://docs.python.org/3/library/math.html#math.log10)
/// - [Python documentation: `math.e`](https://docs.python.org/3/library/math.html#math.e)
#[violation]
pub struct RedundantLogBase {
base: Base,
Expand Down

0 comments on commit 3e64f5d

Please sign in to comment.