Skip to content

Commit

Permalink
Improve consistency of some rule docs (#2887)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Feb 14, 2023
1 parent 53e810e commit f751573
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 14 deletions.
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doc-valid-idents = ["StackOverflow", "CodeQL", ".."]
1 change: 0 additions & 1 deletion crates/ruff/src/rules/flake8_no_pep420/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
}
Expand Down
3 changes: 0 additions & 3 deletions crates/ruff/src/rules/flake8_quotes/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ define_violation!(
/// strings, but be consistent.
///
/// ## Options
///
/// * `flake8-quotes.inline-quotes`
///
/// ## Example
Expand Down Expand Up @@ -67,7 +66,6 @@ define_violation!(
/// strings, but be consistent.
///
/// ## Options
///
/// * `flake8-quotes.multiline-quotes`
///
/// ## Example
Expand Down Expand Up @@ -116,7 +114,6 @@ define_violation!(
/// strings, but be consistent.
///
/// ## Options
///
/// * `flake8-quotes.docstring-quotes`
///
/// ## Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ define_violation!(
/// > ```
///
/// ## Options
///
/// * `flake8-tidy-imports.ban-relative-imports`
///
/// ## Example
Expand Down
1 change: 0 additions & 1 deletion crates/ruff/src/rules/mccabe/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ define_violation!(
/// Functions with a high complexity are hard to understand and maintain.
///
/// ## Options
///
/// * `mccabe.max-complexity`
///
/// ## Example
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff/src/rules/pandas_vet/rules/inplace_argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions crates/ruff/src/rules/pycodestyle/rules/bare_except.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion crates/ruff/src/rules/pyflakes/rules/unused_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ define_violation!(
/// [`dummy-variable-rgx`] pattern.
///
/// ## Options
///
/// * `dummy-variable-rgx`
///
/// ## Example
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff/src/rules/pylint/rules/yield_in_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
);

Expand Down

0 comments on commit f751573

Please sign in to comment.