Improve consistency of some rule docs (#2887)

This commit is contained in:
Charlie Marsh 2023-02-13 23:36:37 -05:00 committed by GitHub
parent 53e810ed3e
commit f7515739ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 8 additions and 14 deletions

1
clippy.toml Normal file
View file

@ -0,0 +1 @@
doc-valid-idents = ["StackOverflow", "CodeQL", ".."]

View file

@ -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,

View file

@ -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,
}

View file

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

View file

@ -49,7 +49,6 @@ define_violation!(
/// > ```
///
/// ## Options
///
/// * `flake8-tidy-imports.ban-relative-imports`
///
/// ## Example

View file

@ -19,7 +19,6 @@ define_violation!(
/// Functions with a high complexity are hard to understand and maintain.
///
/// ## Options
///
/// * `mccabe.max-complexity`
///
/// ## Example

View file

@ -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 {

View file

@ -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 {

View file

@ -28,7 +28,6 @@ define_violation!(
/// [`dummy-variable-rgx`] pattern.
///
/// ## Options
///
/// * `dummy-variable-rgx`
///
/// ## Example

View file

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