mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:10:09 +00:00
Use 'Checks for uses' consistently (#5279)
This commit is contained in:
parent
ac146e11f0
commit
c0c59b82ec
6 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@ use ruff_macros::{derive_message_formats, violation};
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of comparators other than `<` and `>=` for
|
/// Checks for uses of comparators other than `<` and `>=` for
|
||||||
/// `sys.version_info` checks in `.pyi` files. All other comparators, such
|
/// `sys.version_info` checks in `.pyi` files. All other comparators, such
|
||||||
/// as `>`, `<=`, and `==`, are banned.
|
/// as `>`, `<=`, and `==`, are banned.
|
||||||
///
|
///
|
||||||
|
|
|
@ -7,7 +7,7 @@ use ruff_python_semantic::SemanticModel;
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of the builtin `open()` function without an associated context
|
/// Checks for uses of the builtin `open()` function without an associated context
|
||||||
/// manager.
|
/// manager.
|
||||||
///
|
///
|
||||||
/// ## Why is this bad?
|
/// ## Why is this bad?
|
||||||
|
|
|
@ -6,7 +6,7 @@ use ruff_macros::{derive_message_formats, violation};
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of the builtin `eval()` function.
|
/// Checks for uses of the builtin `eval()` function.
|
||||||
///
|
///
|
||||||
/// ## Why is this bad?
|
/// ## Why is this bad?
|
||||||
/// The `eval()` function is insecure as it enables arbitrary code execution.
|
/// The `eval()` function is insecure as it enables arbitrary code execution.
|
||||||
|
|
|
@ -6,7 +6,7 @@ use ruff_macros::{derive_message_formats, violation};
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of `await` outside of `async` functions.
|
/// Checks for uses of `await` outside of `async` functions.
|
||||||
///
|
///
|
||||||
/// ## Why is this bad?
|
/// ## Why is this bad?
|
||||||
/// Using `await` outside of an `async` function is a syntax error.
|
/// Using `await` outside of an `async` function is a syntax error.
|
||||||
|
|
|
@ -7,7 +7,7 @@ use ruff_python_ast::source_code::OneIndexed;
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of names that are declared as `global` prior to the
|
/// Checks for uses of names that are declared as `global` prior to the
|
||||||
/// relevant `global` declaration.
|
/// relevant `global` declaration.
|
||||||
///
|
///
|
||||||
/// ## Why is this bad?
|
/// ## Why is this bad?
|
||||||
|
|
|
@ -6,7 +6,7 @@ use ruff_macros::{derive_message_formats, violation};
|
||||||
use crate::checkers::ast::Checker;
|
use crate::checkers::ast::Checker;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
/// Checks for usages of named expressions (e.g., `a := 42`) that can be
|
/// Checks for uses of named expressions (e.g., `a := 42`) that can be
|
||||||
/// replaced by regular assignment statements (e.g., `a = 42`).
|
/// replaced by regular assignment statements (e.g., `a = 42`).
|
||||||
///
|
///
|
||||||
/// ## Why is this bad?
|
/// ## Why is this bad?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue