Update dependency black to v24 (#12728)

This commit is contained in:
renovate[bot] 2024-08-10 18:04:37 +05:30 committed by GitHub
parent 69e1c567d4
commit 597c5f9124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 292 additions and 302 deletions

View file

@ -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."""

View file

@ -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):

View file

@ -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."""