mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
Improve consistency of some rule docs (#2887)
This commit is contained in:
parent
53e810ed3e
commit
f7515739ac
10 changed files with 8 additions and 14 deletions
1
clippy.toml
Normal file
1
clippy.toml
Normal file
|
@ -0,0 +1 @@
|
|||
doc-valid-idents = ["StackOverflow", "CodeQL", ".."]
|
|
@ -25,7 +25,6 @@ define_violation!(
|
|||
/// the absence of the `__init__.py` file is probably an oversight.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `namespace-packages`
|
||||
pub struct ImplicitNamespacePackage {
|
||||
pub filename: String,
|
||||
|
|
|
@ -36,7 +36,7 @@ define_violation!(
|
|||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// - [PEP 484](https://peps.python.org/pep-0484/#version-and-platform-checking)
|
||||
/// * [PEP 484](https://peps.python.org/pep-0484/#version-and-platform-checking)
|
||||
pub struct UnrecognizedPlatformCheck;
|
||||
);
|
||||
impl Violation for UnrecognizedPlatformCheck {
|
||||
|
@ -72,7 +72,7 @@ define_violation!(
|
|||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// - [PEP 484](https://peps.python.org/pep-0484/#version-and-platform-checking)
|
||||
/// * [PEP 484](https://peps.python.org/pep-0484/#version-and-platform-checking)
|
||||
pub struct UnrecognizedPlatformName {
|
||||
pub platform: String,
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ define_violation!(
|
|||
/// strings, but be consistent.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `flake8-quotes.inline-quotes`
|
||||
///
|
||||
/// ## Example
|
||||
|
@ -67,7 +66,6 @@ define_violation!(
|
|||
/// strings, but be consistent.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `flake8-quotes.multiline-quotes`
|
||||
///
|
||||
/// ## Example
|
||||
|
@ -116,7 +114,6 @@ define_violation!(
|
|||
/// strings, but be consistent.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `flake8-quotes.docstring-quotes`
|
||||
///
|
||||
/// ## Example
|
||||
|
|
|
@ -49,7 +49,6 @@ define_violation!(
|
|||
/// > ```
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `flake8-tidy-imports.ban-relative-imports`
|
||||
///
|
||||
/// ## Example
|
||||
|
|
|
@ -19,7 +19,6 @@ define_violation!(
|
|||
/// Functions with a high complexity are hard to understand and maintain.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `mccabe.max-complexity`
|
||||
///
|
||||
/// ## Example
|
||||
|
|
|
@ -31,7 +31,7 @@ define_violation!(
|
|||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// - [Why You Should Probably Never Use pandas inplace=True](https://towardsdatascience.com/why-you-should-probably-never-use-pandas-inplace-true-9f9f211849e4)
|
||||
/// * [_Why You Should Probably Never Use pandas inplace=True_](https://towardsdatascience.com/why-you-should-probably-never-use-pandas-inplace-true-9f9f211849e4)
|
||||
pub struct UseOfInplaceArgument;
|
||||
);
|
||||
impl AlwaysAutofixableViolation for UseOfInplaceArgument {
|
||||
|
|
|
@ -33,9 +33,9 @@ define_violation!(
|
|||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// - [PEP 8](https://www.python.org/dev/peps/pep-0008/#programming-recommendations)
|
||||
/// - [Python: "Exception hierarchy"](https://docs.python.org/3/library/exceptions.html#exception-hierarchy)
|
||||
/// - [Google Python Style Guide: "Exceptions"](https://google.github.io/styleguide/pyguide.html#24-exceptions)
|
||||
/// * [PEP 8](https://www.python.org/dev/peps/pep-0008/#programming-recommendations)
|
||||
/// * [Python: "Exception hierarchy"](https://docs.python.org/3/library/exceptions.html#exception-hierarchy)
|
||||
/// * [Google Python Style Guide: "Exceptions"](https://google.github.io/styleguide/pyguide.html#24-exceptions)
|
||||
pub struct BareExcept;
|
||||
);
|
||||
impl Violation for BareExcept {
|
||||
|
|
|
@ -28,7 +28,6 @@ define_violation!(
|
|||
/// [`dummy-variable-rgx`] pattern.
|
||||
///
|
||||
/// ## Options
|
||||
///
|
||||
/// * `dummy-variable-rgx`
|
||||
///
|
||||
/// ## Example
|
||||
|
|
|
@ -32,7 +32,7 @@ define_violation!(
|
|||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// * [`py-init-method-is-generator`](https://codeql.github.com/codeql-query-help/python/py-init-method-is-generator/)
|
||||
/// * [CodeQL: `py-init-method-is-generator`](https://codeql.github.com/codeql-query-help/python/py-init-method-is-generator/)
|
||||
pub struct YieldInInit;
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue