mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:53 +00:00
Update dependency black to v24 (#12728)
This commit is contained in:
parent
69e1c567d4
commit
597c5f9124
55 changed files with 292 additions and 302 deletions
|
@ -24,15 +24,16 @@ use crate::registry::Rule;
|
|||
/// For an alternative, see [D211].
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
/// ```python
|
||||
/// class PhotoMetadata:
|
||||
/// """Metadata about a photo."""
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
///
|
||||
/// ```python
|
||||
/// class PhotoMetadata:
|
||||
///
|
||||
/// """Metadata about a photo."""
|
||||
/// ```
|
||||
///
|
||||
|
@ -121,13 +122,14 @@ impl AlwaysFixableViolation for OneBlankLineAfterClass {
|
|||
/// For an alternative, see [D203].
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
/// ```python
|
||||
/// class PhotoMetadata:
|
||||
///
|
||||
/// """Metadata about a photo."""
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
///
|
||||
/// ```python
|
||||
/// class PhotoMetadata:
|
||||
/// """Metadata about a photo."""
|
||||
|
|
|
@ -20,6 +20,7 @@ use crate::docstrings::Docstring;
|
|||
/// the implementation.
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
/// ```python
|
||||
/// from typing import overload
|
||||
///
|
||||
|
@ -42,18 +43,17 @@ use crate::docstrings::Docstring;
|
|||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
///
|
||||
/// ```python
|
||||
/// from typing import overload
|
||||
///
|
||||
///
|
||||
/// @overload
|
||||
/// def factorial(n: int) -> int:
|
||||
/// ...
|
||||
/// def factorial(n: int) -> int: ...
|
||||
///
|
||||
///
|
||||
/// @overload
|
||||
/// def factorial(n: float) -> float:
|
||||
/// ...
|
||||
/// def factorial(n: float) -> float: ...
|
||||
///
|
||||
///
|
||||
/// def factorial(n):
|
||||
|
|
|
@ -28,16 +28,16 @@ use crate::registry::Rule;
|
|||
/// that format for consistency.
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
/// ```python
|
||||
/// class FasterThanLightError(ZeroDivisionError):
|
||||
/// ...
|
||||
/// class FasterThanLightError(ZeroDivisionError): ...
|
||||
///
|
||||
///
|
||||
/// def calculate_speed(distance: float, time: float) -> float:
|
||||
/// ...
|
||||
/// def calculate_speed(distance: float, time: float) -> float: ...
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
///
|
||||
/// ```python
|
||||
/// """Utility functions and classes for calculating speed.
|
||||
///
|
||||
|
@ -47,12 +47,10 @@ use crate::registry::Rule;
|
|||
/// """
|
||||
///
|
||||
///
|
||||
/// class FasterThanLightError(ZeroDivisionError):
|
||||
/// ...
|
||||
/// class FasterThanLightError(ZeroDivisionError): ...
|
||||
///
|
||||
///
|
||||
/// def calculate_speed(distance: float, time: float) -> float:
|
||||
/// ...
|
||||
/// def calculate_speed(distance: float, time: float) -> float: ...
|
||||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
|
@ -430,12 +428,12 @@ impl Violation for UndocumentedMagicMethod {
|
|||
/// that format for consistency.
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
/// ```python
|
||||
/// class Foo:
|
||||
/// """Class Foo."""
|
||||
///
|
||||
/// class Bar:
|
||||
/// ...
|
||||
/// class Bar: ...
|
||||
///
|
||||
///
|
||||
/// bar = Foo.Bar()
|
||||
|
@ -443,6 +441,7 @@ impl Violation for UndocumentedMagicMethod {
|
|||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
///
|
||||
/// ```python
|
||||
/// class Foo:
|
||||
/// """Class Foo."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue