Decouple Diagnostic from "all violations" enumeration (#3352)

This commit is contained in:
Charlie Marsh 2023-03-08 12:51:37 -05:00 committed by GitHub
parent bc869d4f52
commit ffad0bcdaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
804 changed files with 14764 additions and 6792 deletions

View file

@ -4,12 +4,13 @@ use itertools::Itertools;
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use crate::fix::Fix;
use crate::linter::FixTable;
use crate::registry::Diagnostic;
use ruff_python_ast::source_code::Locator; use ruff_python_ast::source_code::Locator;
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::fix::Fix;
use crate::linter::FixTable;
use crate::registry::{AsRule, Diagnostic};
pub mod helpers; pub mod helpers;
/// Auto-fix errors in a file, and write the fixed source code to disk. /// Auto-fix errors in a file, and write the fixed source code to disk.
@ -95,13 +96,13 @@ pub(crate) fn apply_fix(fix: &Fix, locator: &Locator) -> String {
mod tests { mod tests {
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use ruff_python_ast::source_code::Locator;
use crate::autofix::{apply_fix, apply_fixes}; use crate::autofix::{apply_fix, apply_fixes};
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::Diagnostic;
use crate::rules::pycodestyle::rules::NoNewLineAtEndOfFile; use crate::rules::pycodestyle::rules::NoNewLineAtEndOfFile;
use ruff_python_ast::source_code::Locator;
#[test] #[test]
fn empty_file() { fn empty_file() {
let fixes: Vec<Diagnostic> = vec![]; let fixes: Vec<Diagnostic> = vec![];

View file

@ -36,7 +36,7 @@ use crate::checkers::ast::deferred::Deferred;
use crate::docstrings::definition::{ use crate::docstrings::definition::{
transition_scope, Definition, DefinitionKind, Docstring, Documentable, transition_scope, Definition, DefinitionKind, Docstring, Documentable,
}; };
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rules::{ use crate::rules::{
flake8_2020, flake8_annotations, flake8_bandit, flake8_blind_except, flake8_boolean_trap, flake8_2020, flake8_annotations, flake8_bandit, flake8_blind_except, flake8_boolean_trap,
flake8_bugbear, flake8_builtins, flake8_comprehensions, flake8_datetimez, flake8_debugger, flake8_bugbear, flake8_builtins, flake8_comprehensions, flake8_datetimez, flake8_debugger,

View file

@ -5,7 +5,7 @@ use itertools::Itertools;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use rustpython_parser::lexer::LexResult; use rustpython_parser::lexer::LexResult;
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rules::pycodestyle::logical_lines::{iter_logical_lines, TokenFlags}; use crate::rules::pycodestyle::logical_lines::{iter_logical_lines, TokenFlags};
use crate::rules::pycodestyle::rules::{ use crate::rules::pycodestyle::rules::{
extraneous_whitespace, indentation, missing_whitespace, missing_whitespace_after_keyword, extraneous_whitespace, indentation, missing_whitespace, missing_whitespace_after_keyword,

View file

@ -4,15 +4,16 @@ use log::warn;
use nohash_hasher::IntMap; use nohash_hasher::IntMap;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use ruff_python_ast::types::Range;
use crate::codes::NoqaCode; use crate::codes::NoqaCode;
use crate::fix::Fix; use crate::fix::Fix;
use crate::noqa; use crate::noqa;
use crate::noqa::{extract_file_exemption, Directive, Exemption}; use crate::noqa::{extract_file_exemption, Directive, Exemption};
use crate::registry::{Diagnostic, DiagnosticKind, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rule_redirects::get_redirect_target; use crate::rule_redirects::get_redirect_target;
use crate::rules::ruff::rules::{UnusedCodes, UnusedNOQA}; use crate::rules::ruff::rules::{UnusedCodes, UnusedNOQA};
use crate::settings::{flags, Settings}; use crate::settings::{flags, Settings};
use ruff_python_ast::types::Range;
pub fn check_noqa( pub fn check_noqa(
diagnostics: &mut Vec<Diagnostic>, diagnostics: &mut Vec<Diagnostic>,
@ -65,7 +66,7 @@ pub fn check_noqa(
// Remove any ignored diagnostics. // Remove any ignored diagnostics.
for (index, diagnostic) in diagnostics.iter().enumerate() { for (index, diagnostic) in diagnostics.iter().enumerate() {
if matches!(diagnostic.kind, DiagnosticKind::BlanketNOQA(..)) { if matches!(diagnostic.kind.rule(), Rule::BlanketNOQA) {
continue; continue;
} }

View file

@ -4,7 +4,7 @@ use rustpython_parser::lexer::LexResult;
use rustpython_parser::Tok; use rustpython_parser::Tok;
use crate::lex::docstring_detection::StateMachine; use crate::lex::docstring_detection::StateMachine;
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rules::ruff::rules::Context; use crate::rules::ruff::rules::Context;
use crate::rules::{ use crate::rules::{
eradicate, flake8_commas, flake8_implicit_str_concat, flake8_pyi, flake8_quotes, pycodestyle, eradicate, flake8_commas, flake8_implicit_str_concat, flake8_pyi, flake8_quotes, pycodestyle,

View file

@ -7,7 +7,7 @@ use wasm_bindgen::prelude::*;
use crate::directives; use crate::directives;
use crate::linter::{check_path, LinterResult}; use crate::linter::{check_path, LinterResult};
use crate::registry::Rule; use crate::registry::{AsRule, Rule};
use crate::rules::{ use crate::rules::{
flake8_annotations, flake8_bandit, flake8_bugbear, flake8_builtins, flake8_comprehensions, flake8_annotations, flake8_bandit, flake8_bugbear, flake8_builtins, flake8_comprehensions,
flake8_errmsg, flake8_implicit_str_concat, flake8_import_conventions, flake8_pytest_style, flake8_errmsg, flake8_implicit_str_concat, flake8_import_conventions, flake8_pytest_style,
@ -50,17 +50,17 @@ export interface Diagnostic {
"#; "#;
#[derive(Serialize)] #[derive(Serialize)]
struct ExpandedMessage { struct ExpandedMessage<'a> {
code: SerializeRuleAsCode, code: SerializeRuleAsCode<'a>,
message: String, message: String,
location: Location, location: Location,
end_location: Location, end_location: Location,
fix: Option<ExpandedFix>, fix: Option<ExpandedFix>,
} }
struct SerializeRuleAsCode(Rule); struct SerializeRuleAsCode<'a>(&'a Rule);
impl Serialize for SerializeRuleAsCode { impl Serialize for SerializeRuleAsCode<'_> {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where where
S: serde::Serializer, S: serde::Serializer,
@ -69,8 +69,8 @@ impl Serialize for SerializeRuleAsCode {
} }
} }
impl From<Rule> for SerializeRuleAsCode { impl<'a> From<&'a Rule> for SerializeRuleAsCode<'a> {
fn from(rule: Rule) -> Self { fn from(rule: &'a Rule) -> Self {
Self(rule) Self(rule)
} }
} }
@ -207,14 +207,14 @@ pub fn check(contents: &str, options: JsValue) -> Result<JsValue, JsValue> {
let messages: Vec<ExpandedMessage> = diagnostics let messages: Vec<ExpandedMessage> = diagnostics
.into_iter() .into_iter()
.map(|diagnostic| ExpandedMessage { .map(|message| ExpandedMessage {
code: diagnostic.kind.rule().clone().into(), code: message.kind.rule().into(),
message: diagnostic.kind.body(), message: message.kind.body.clone(),
location: diagnostic.location, location: message.location,
end_location: diagnostic.end_location, end_location: message.end_location,
fix: diagnostic.fix.map(|fix| ExpandedFix { fix: message.fix.map(|fix| ExpandedFix {
content: fix.content, content: fix.content,
message: diagnostic.kind.commit(), message: message.kind.commit,
location: fix.location, location: fix.location,
end_location: fix.end_location, end_location: fix.end_location,
}), }),

View file

@ -21,7 +21,7 @@ use crate::directives::Directives;
use crate::doc_lines::{doc_lines_from_ast, doc_lines_from_tokens}; use crate::doc_lines::{doc_lines_from_ast, doc_lines_from_tokens};
use crate::message::{Message, Source}; use crate::message::{Message, Source};
use crate::noqa::{add_noqa, rule_is_ignored}; use crate::noqa::{add_noqa, rule_is_ignored};
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rules::pycodestyle; use crate::rules::pycodestyle;
use crate::settings::{flags, Settings}; use crate::settings::{flags, Settings};
use crate::{directives, fs}; use crate::{directives, fs};
@ -202,7 +202,7 @@ pub fn check_path(
if !diagnostics.is_empty() && !settings.per_file_ignores.is_empty() { if !diagnostics.is_empty() && !settings.per_file_ignores.is_empty() {
let ignores = fs::ignores_from_path(path, &settings.per_file_ignores); let ignores = fs::ignores_from_path(path, &settings.per_file_ignores);
if !ignores.is_empty() { if !ignores.is_empty() {
diagnostics.retain(|diagnostic| !ignores.contains(&diagnostic.kind.rule())); diagnostics.retain(|diagnostic| !ignores.contains(diagnostic.kind.rule()));
} }
}; };

View file

@ -11,12 +11,13 @@ use regex::Regex;
use rustc_hash::{FxHashMap, FxHashSet}; use rustc_hash::{FxHashMap, FxHashSet};
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use crate::codes::NoqaCode;
use crate::registry::{Diagnostic, Rule};
use crate::rule_redirects::get_redirect_target;
use ruff_python_ast::source_code::{LineEnding, Locator}; use ruff_python_ast::source_code::{LineEnding, Locator};
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::codes::NoqaCode;
use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rule_redirects::get_redirect_target;
static NOQA_LINE_REGEX: Lazy<Regex> = Lazy::new(|| { static NOQA_LINE_REGEX: Lazy<Regex> = Lazy::new(|| {
Regex::new( Regex::new(
r"(?P<spaces>\s*)(?P<noqa>(?i:# noqa)(?::\s?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?)", r"(?P<spaces>\s*)(?P<noqa>(?i:# noqa)(?::\s?(?P<codes>([A-Z]+[0-9]+(?:[,\s]+)?)+))?)",
@ -332,12 +333,13 @@ mod tests {
use nohash_hasher::IntMap; use nohash_hasher::IntMap;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use ruff_python_ast::source_code::LineEnding;
use ruff_python_ast::types::Range;
use crate::noqa::{add_noqa_inner, NOQA_LINE_REGEX}; use crate::noqa::{add_noqa_inner, NOQA_LINE_REGEX};
use crate::registry::Diagnostic; use crate::registry::Diagnostic;
use crate::rules::pycodestyle::rules::AmbiguousVariableName; use crate::rules::pycodestyle::rules::AmbiguousVariableName;
use crate::rules::pyflakes; use crate::rules::pyflakes;
use ruff_python_ast::source_code::LineEnding;
use ruff_python_ast::types::Range;
#[test] #[test]
fn regex() { fn regex() {

View file

@ -1,15 +1,16 @@
//! Registry of [`Rule`] to [`DiagnosticKind`] mappings. //! Registry of [`Rule`] to [`DiagnosticKind`] mappings.
use ruff_macros::RuleNamespace;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use strum_macros::{AsRefStr, EnumIter}; use strum_macros::{AsRefStr, EnumIter};
use ruff_macros::RuleNamespace;
use ruff_python_ast::types::Range;
use crate::codes::{self, RuleCodePrefix}; use crate::codes::{self, RuleCodePrefix};
use crate::fix::Fix; use crate::fix::Fix;
use crate::rules; use crate::rules;
use crate::violation::Violation; use crate::violation::Violation;
use ruff_python_ast::types::Range;
ruff_macros::register_rules!( ruff_macros::register_rules!(
// pycodestyle errors // pycodestyle errors
@ -883,6 +884,18 @@ impl Rule {
} }
} }
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct DiagnosticKind {
/// The identifier of the corresponding [`Rule`].
pub name: String,
/// The message body to display to the user, to explain the diagnostic.
pub body: String,
/// The message to display to the user, to explain the suggested fix.
pub commit: Option<String>,
/// Whether the diagnostic is automatically fixable.
pub fixable: bool,
}
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Diagnostic { pub struct Diagnostic {
pub kind: DiagnosticKind, pub kind: DiagnosticKind,

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/eradicate/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
CommentedOutCode: ~ name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location: location:
row: 1 row: 1
column: 0 column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 0 column: 0
parent: ~ parent: ~
- kind: - kind:
CommentedOutCode: ~ name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location: location:
row: 2 row: 2
column: 0 column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 0 column: 0
parent: ~ parent: ~
- kind: - kind:
CommentedOutCode: ~ name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location: location:
row: 3 row: 3
column: 0 column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 0 column: 0
parent: ~ parent: ~
- kind: - kind:
CommentedOutCode: ~ name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location: location:
row: 5 row: 5
column: 0 column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 0 column: 0
parent: ~ parent: ~
- kind: - kind:
CommentedOutCode: ~ name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location: location:
row: 12 row: 12
column: 4 column: 4

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionSlice3Referenced: ~ name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 6 column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionSlice3Referenced: ~ name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 6 column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionSlice3Referenced: ~ name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 6 column: 6

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersion2Referenced: ~ name: SysVersion2Referenced
body: "`sys.version[2]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 11 column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersion2Referenced: ~ name: SysVersion2Referenced
body: "`sys.version[2]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 11 column: 11

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionCmpStr3: ~ name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr3: ~ name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr3: ~ name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr3: ~ name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 0 column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr3: ~ name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionInfo0Eq3Referenced: ~ name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 6 column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionInfo0Eq3Referenced: ~ name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 6 column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionInfo0Eq3Referenced: ~ name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 6 column: 6
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionInfo0Eq3Referenced: ~ name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 6 column: 6

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SixPY3Referenced: ~ name: SixPY3Referenced
body: "`six.PY3` referenced (python4), use `not six.PY2`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 3 column: 3
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SixPY3Referenced: ~ name: SixPY3Referenced
body: "`six.PY3` referenced (python4), use `not six.PY2`"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 3 column: 3

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionInfo1CmpInt: ~ name: SysVersionInfo1CmpInt
body: "`sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionInfo1CmpInt: ~ name: SysVersionInfo1CmpInt
body: "`sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionInfoMinorCmpInt: ~ name: SysVersionInfoMinorCmpInt
body: "`sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionInfoMinorCmpInt: ~ name: SysVersionInfoMinorCmpInt
body: "`sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersion0Referenced: ~ name: SysVersion0Referenced
body: "`sys.version[0]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 11 column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersion0Referenced: ~ name: SysVersion0Referenced
body: "`sys.version[0]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 11 column: 11

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionCmpStr10: ~ name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr10: ~ name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr10: ~ name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr10: ~ name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 0 column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionCmpStr10: ~ name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_2020/mod.rs source: crates/ruff/src/rules/flake8_2020/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SysVersionSlice1Referenced: ~ name: SysVersionSlice1Referenced
body: "`sys.version[:1]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 6 column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SysVersionSlice1Referenced: ~ name: SysVersionSlice1Referenced
body: "`sys.version[:1]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 6 column: 6

View file

@ -11,7 +11,7 @@ use ruff_python_ast::{cast, helpers};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::docstrings::definition::{Definition, DefinitionKind}; use crate::docstrings::definition::{Definition, DefinitionKind};
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::violation::{AlwaysAutofixableViolation, Violation}; use crate::violation::{AlwaysAutofixableViolation, Violation};
use super::fixes; use super::fixes;

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_annotations/mod.rs source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: bar body: "Missing return type annotation for public function `bar`"
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 8 column: 8

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
AnyType: name: AnyType
name: a body: "Dynamically typed expressions (typing.Any) are disallowed in `a`"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 11 column: 11
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: foo body: "Dynamically typed expressions (typing.Any) are disallowed in `foo`"
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 46 column: 46
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: a body: "Dynamically typed expressions (typing.Any) are disallowed in `a`"
commit: ~
fixable: false
location: location:
row: 40 row: 40
column: 28 column: 28
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: foo_method body: "Dynamically typed expressions (typing.Any) are disallowed in `foo_method`"
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 66 column: 66

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: a body: "Missing type annotation for function argument `a`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 8 column: 8
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: b body: "Missing type annotation for function argument `b`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 11 column: 11
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 4 column: 4
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: b body: "Missing type annotation for function argument `b`"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 16 column: 16
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: b body: "Missing type annotation for function argument `b`"
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 16 column: 16
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 4 column: 4
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: a body: "Dynamically typed expressions (typing.Any) are disallowed in `a`"
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 11 column: 11
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: foo body: "Dynamically typed expressions (typing.Any) are disallowed in `foo`"
commit: ~
fixable: false
location: location:
row: 49 row: 49
column: 46 column: 46
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "*args" body: "Dynamically typed expressions (typing.Any) are disallowed in `*args`"
commit: ~
fixable: false
location: location:
row: 54 row: 54
column: 23 column: 23
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "**kwargs" body: "Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`"
commit: ~
fixable: false
location: location:
row: 54 row: 54
column: 38 column: 38
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "*args" body: "Dynamically typed expressions (typing.Any) are disallowed in `*args`"
commit: ~
fixable: false
location: location:
row: 59 row: 59
column: 23 column: 23
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "**kwargs" body: "Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`"
commit: ~
fixable: false
location: location:
row: 64 row: 64
column: 38 column: 38
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeSelf: name: MissingTypeSelf
name: self body: "Missing type annotation for `self` in method"
commit: ~
fixable: false
location: location:
row: 74 row: 74
column: 12 column: 12
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: a body: "Dynamically typed expressions (typing.Any) are disallowed in `a`"
commit: ~
fixable: false
location: location:
row: 78 row: 78
column: 28 column: 28
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: foo body: "Dynamically typed expressions (typing.Any) are disallowed in `foo`"
commit: ~
fixable: false
location: location:
row: 82 row: 82
column: 66 column: 66
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "*params" body: "Dynamically typed expressions (typing.Any) are disallowed in `*params`"
commit: ~
fixable: false
location: location:
row: 86 row: 86
column: 42 column: 42
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "**options" body: "Dynamically typed expressions (typing.Any) are disallowed in `**options`"
commit: ~
fixable: false
location: location:
row: 86 row: 86
column: 58 column: 58
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "*params" body: "Dynamically typed expressions (typing.Any) are disallowed in `*params`"
commit: ~
fixable: false
location: location:
row: 90 row: 90
column: 42 column: 42
@ -223,8 +263,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AnyType: name: AnyType
name: "**options" body: "Dynamically typed expressions (typing.Any) are disallowed in `**options`"
commit: ~
fixable: false
location: location:
row: 94 row: 94
column: 58 column: 58
@ -234,8 +276,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeCls: name: MissingTypeCls
name: cls body: "Missing type annotation for `cls` in classmethod"
commit: ~
fixable: false
location: location:
row: 104 row: 104
column: 12 column: 12
@ -245,8 +289,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeSelf: name: MissingTypeSelf
name: self body: "Missing type annotation for `self` in method"
commit: ~
fixable: false
location: location:
row: 108 row: 108
column: 12 column: 12

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: error_partially_typed_1 body: "Missing return type annotation for public function `error_partially_typed_1`"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: b body: "Missing type annotation for function argument `b`"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 36 column: 36
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: b body: "Missing type annotation for function argument `b`"
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 36 column: 36
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: error_partially_typed_3 body: "Missing return type annotation for public function `error_partially_typed_3`"
commit: ~
fixable: false
location: location:
row: 32 row: 32
column: 4 column: 4
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: error_typed_self body: "Missing return type annotation for public function `error_typed_self`"
commit: ~
fixable: false
location: location:
row: 43 row: 43
column: 8 column: 8

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MissingReturnTypeSpecialMethod: name: MissingReturnTypeSpecialMethod
name: __init__ body: "Missing return type annotation for special method `__init__`"
commit: "Add `None` return type"
fixable: true
location: location:
row: 5 row: 5
column: 8 column: 8
@ -21,8 +23,10 @@ expression: diagnostics
column: 22 column: 22
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypeSpecialMethod: name: MissingReturnTypeSpecialMethod
name: __init__ body: "Missing return type annotation for special method `__init__`"
commit: "Add `None` return type"
fixable: true
location: location:
row: 11 row: 11
column: 8 column: 8
@ -39,8 +43,10 @@ expression: diagnostics
column: 27 column: 27
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePrivateFunction: name: MissingReturnTypePrivateFunction
name: __init__ body: "Missing return type annotation for private function `__init__`"
commit: ~
fixable: false
location: location:
row: 40 row: 40
column: 4 column: 4
@ -50,8 +56,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypeSpecialMethod: name: MissingReturnTypeSpecialMethod
name: __init__ body: "Missing return type annotation for special method `__init__`"
commit: "Add `None` return type"
fixable: true
location: location:
row: 47 row: 47
column: 8 column: 8

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_annotations/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 45 row: 45
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingReturnTypePublicFunction: name: MissingReturnTypePublicFunction
name: foo body: "Missing return type annotation for public function `foo`"
commit: ~
fixable: false
location: location:
row: 50 row: 50
column: 4 column: 4
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MissingTypeFunctionArgument: name: MissingTypeFunctionArgument
name: a body: "Missing type annotation for function argument `a`"
commit: ~
fixable: false
location: location:
row: 59 row: 59
column: 8 column: 8

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
Assert: ~ name: Assert
body: "Use of `assert` detected"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Assert: ~ name: Assert
body: "Use of `assert` detected"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 4 column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Assert: ~ name: Assert
body: "Use of `assert` detected"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
ExecBuiltin: ~ name: ExecBuiltin
body: "Use of `exec` detected"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 4 column: 4
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ExecBuiltin: ~ name: ExecBuiltin
body: "Use of `exec` detected"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 151 body: "`os.chmod` setting a permissive mask `0o227` on file or directory"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 24 column: 24
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 7 body: "`os.chmod` setting a permissive mask `0o7` on file or directory"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 24 column: 24
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 24 column: 24
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 504 body: "`os.chmod` setting a permissive mask `0o770` on file or directory"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 24 column: 24
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 510 body: "`os.chmod` setting a permissive mask `0o776` on file or directory"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 24 column: 24
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 22 column: 22
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 23 column: 23
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 24 column: 24
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 18 column: 18
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 18 column: 18
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 511 body: "`os.chmod` setting a permissive mask `0o777` on file or directory"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 18 column: 18
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 8 body: "`os.chmod` setting a permissive mask `0o10` on file or directory"
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 26 column: 26
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BadFilePermissions: name: BadFilePermissions
mask: 2 body: "`os.chmod` setting a permissive mask `0o2` on file or directory"
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 24 column: 24

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedBindAllInterfaces: ~ name: HardcodedBindAllInterfaces
body: Possible binding to all interfaces
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedBindAllInterfaces: ~ name: HardcodedBindAllInterfaces
body: Possible binding to all interfaces
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedBindAllInterfaces: ~ name: HardcodedBindAllInterfaces
body: Possible binding to all interfaces
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 5 column: 5
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedBindAllInterfaces: ~ name: HardcodedBindAllInterfaces
body: Possible binding to all interfaces
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 8 column: 8

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 11 column: 11
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 8 column: 8
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 9 column: 9
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 6 column: 6
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 9 column: 9
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 8 column: 8
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 10 column: 10
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 18 column: 18
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 18 column: 18
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 11 column: 11
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 23 row: 23
column: 11 column: 11
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 25 row: 25
column: 16 column: 16
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 26 row: 26
column: 12 column: 12
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 14 column: 14
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 11 column: 11
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 14 column: 14
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 13 column: 13
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 31 row: 31
column: 15 column: 15
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 32 row: 32
column: 23 column: 23
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 33 row: 33
column: 23 column: 23
@ -223,8 +263,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 37 row: 37
column: 15 column: 15
@ -234,8 +276,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 41 row: 41
column: 19 column: 19
@ -245,8 +289,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 16 column: 16
@ -256,8 +302,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 43 row: 43
column: 17 column: 17
@ -267,8 +315,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 14 column: 14
@ -278,8 +328,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 45 row: 45
column: 17 column: 17
@ -289,8 +341,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 46 row: 46
column: 16 column: 16
@ -300,8 +354,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 47 row: 47
column: 18 column: 18
@ -311,8 +367,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 49 row: 49
column: 12 column: 12
@ -322,8 +380,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 50 row: 50
column: 9 column: 9
@ -333,8 +393,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 51 row: 51
column: 10 column: 10
@ -344,8 +406,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 52 row: 52
column: 7 column: 7
@ -355,8 +419,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 53 row: 53
column: 10 column: 10
@ -366,8 +432,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 54 row: 54
column: 9 column: 9
@ -377,8 +445,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 55 row: 55
column: 11 column: 11
@ -388,8 +458,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 56 row: 56
column: 20 column: 20
@ -399,8 +471,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: "1\n2" body: "Possible hardcoded password: \"1\\n2\""
commit: ~
fixable: false
location: location:
row: 58 row: 58
column: 12 column: 12
@ -410,8 +484,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: "3\t4" body: "Possible hardcoded password: \"3\\t4\""
commit: ~
fixable: false
location: location:
row: 61 row: 61
column: 12 column: 12
@ -421,8 +497,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordString: name: HardcodedPasswordString
string: "5\r6" body: "Possible hardcoded password: \"5\\r6\""
commit: ~
fixable: false
location: location:
row: 64 row: 64
column: 12 column: 12

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedPasswordFuncArg: name: HardcodedPasswordFuncArg
string: s3cr3t body: "Possible hardcoded password: \"s3cr3t\""
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 8 column: 8

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedPasswordDefault: name: HardcodedPasswordDefault
string: default body: "Possible hardcoded password: \"default\""
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 28 column: 28
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordDefault: name: HardcodedPasswordDefault
string: posonly body: "Possible hardcoded password: \"posonly\""
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 44 column: 44
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordDefault: name: HardcodedPasswordDefault
string: kwonly body: "Possible hardcoded password: \"kwonly\""
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 38 column: 38
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordDefault: name: HardcodedPasswordDefault
string: posonly body: "Possible hardcoded password: \"posonly\""
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 38 column: 38
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedPasswordDefault: name: HardcodedPasswordDefault
string: kwonly body: "Possible hardcoded password: \"kwonly\""
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 61 column: 61

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /tmp/abc body: "Probable insecure usage of temporary file or directory: \"/tmp/abc\""
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 10 column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /var/tmp/123 body: "Probable insecure usage of temporary file or directory: \"/var/tmp/123\""
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 10 column: 10
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /dev/shm/unit/test body: "Probable insecure usage of temporary file or directory: \"/dev/shm/unit/test\""
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 10 column: 10

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /tmp/abc body: "Probable insecure usage of temporary file or directory: \"/tmp/abc\""
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 10 column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /var/tmp/123 body: "Probable insecure usage of temporary file or directory: \"/var/tmp/123\""
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 10 column: 10
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /dev/shm/unit/test body: "Probable insecure usage of temporary file or directory: \"/dev/shm/unit/test\""
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 10 column: 10
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedTempFile: name: HardcodedTempFile
string: /foo/bar body: "Probable insecure usage of temporary file or directory: \"/foo/bar\""
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 10 column: 10

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
TryExceptPass: ~ name: TryExceptPass
body: "`try`-`except`-`pass` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptPass: ~ name: TryExceptPass
body: "`try`-`except`-`pass` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
TryExceptPass: ~ name: TryExceptPass
body: "`try`-`except`-`pass` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptPass: ~ name: TryExceptPass
body: "`try`-`except`-`pass` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptPass: ~ name: TryExceptPass
body: "`try`-`except`-`pass` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
TryExceptContinue: ~ name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptContinue: ~ name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptContinue: ~ name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TryExceptContinue: ~ name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 0 column: 0

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 42 column: 42
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 43 column: 43
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 42 column: 42
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 0 column: 0
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 45 column: 45
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 0 column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 44 column: 44
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 0 column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 46 column: 46
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: ~ body: Probable use of requests call without timeout
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 0 column: 0
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithoutTimeout: name: RequestWithoutTimeout
timeout: None body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 43 column: 43

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: md5 body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 12 column: 12
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: md4 body: "Probable use of insecure hash functions in `hashlib`: `md4`"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 12 column: 12
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: md5 body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 17 column: 17
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: MD4 body: "Probable use of insecure hash functions in `hashlib`: `MD4`"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 12 column: 12
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha1 body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 12 column: 12
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha1 body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 12 column: 12
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha body: "Probable use of insecure hash functions in `hashlib`: `sha`"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 12 column: 12
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: SHA body: "Probable use of insecure hash functions in `hashlib`: `SHA`"
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 17 column: 17
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha body: "Probable use of insecure hash functions in `hashlib`: `sha`"
commit: ~
fixable: false
location: location:
row: 23 row: 23
column: 0 column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: md5 body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location: location:
row: 25 row: 25
column: 0 column: 0
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha1 body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 12 column: 12
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha1 body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 0 column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HashlibInsecureHashFunction: name: HashlibInsecureHashFunction
string: sha1 body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location: location:
row: 32 row: 32
column: 12 column: 12

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 53 column: 53
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 54 column: 54
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 53 column: 53
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 56 column: 56
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 55 column: 55
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 57 column: 57
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: requests body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 54 column: 54
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 49 column: 49
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 38 column: 38
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 42 column: 42
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 26 row: 26
column: 39 column: 39
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 39 column: 39
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 38 column: 38
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 32 row: 32
column: 40 column: 40
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 34 row: 34
column: 41 column: 41
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 36 row: 36
column: 41 column: 41
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 38 row: 38
column: 20 column: 20
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RequestWithNoCertValidation: name: RequestWithNoCertValidation
string: httpx body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location: location:
row: 40 row: 40
column: 25 column: 25

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UnsafeYAMLLoad: name: UnsafeYAMLLoad
loader: ~ body: "Probable use of unsafe `yaml.load`. Allows instantiation of arbitrary objects. Consider `yaml.safe_load`."
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 8 column: 8
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnsafeYAMLLoad: name: UnsafeYAMLLoad
loader: Loader body: "Probable use of unsafe loader `Loader` with `yaml.load`. Allows instantiation of arbitrary objects. Consider `yaml.safe_load`."
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 23 column: 23

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SnmpInsecureVersion: ~ name: SnmpInsecureVersion
body: The use of SNMPv1 and SNMPv2 is insecure. Use SNMPv3 if able.
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 32 column: 32
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SnmpInsecureVersion: ~ name: SnmpInsecureVersion
body: The use of SNMPv1 and SNMPv2 is insecure. Use SNMPv3 if able.
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 32 column: 32

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SnmpWeakCryptography: ~ name: SnmpWeakCryptography
body: "You should not use SNMPv3 without encryption. `noAuthNoPriv` & `authNoPriv` is insecure."
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 11 column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
SnmpWeakCryptography: ~ name: SnmpWeakCryptography
body: "You should not use SNMPv3 without encryption. `noAuthNoPriv` & `authNoPriv` is insecure."
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 15 column: 15

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 9 column: 9
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 9 column: 9
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 9 column: 9
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 9 column: 9
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 9 column: 9
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 9 column: 9
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 9 column: 9
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 9 column: 9
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 9 column: 9
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 10 column: 10
@ -103,7 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 10 column: 10
@ -113,7 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 10 column: 10
@ -123,7 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 10 column: 10
@ -133,7 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 10 column: 10
@ -143,7 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 10 column: 10
@ -153,7 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 10 column: 10
@ -163,7 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 10 column: 10
@ -173,7 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 10 column: 10
@ -183,7 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 10 column: 10
@ -193,7 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 25 row: 25
column: 10 column: 10
@ -203,7 +263,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 26 row: 26
column: 10 column: 10
@ -213,7 +276,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 10 column: 10
@ -223,7 +289,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 10 column: 10
@ -233,7 +302,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 10 column: 10
@ -243,7 +315,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 31 row: 31
column: 10 column: 10
@ -253,7 +328,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 32 row: 32
column: 10 column: 10
@ -263,7 +341,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 33 row: 33
column: 10 column: 10
@ -273,7 +354,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 34 row: 34
column: 10 column: 10
@ -283,7 +367,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 36 row: 36
column: 10 column: 10
@ -293,7 +380,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 37 row: 37
column: 10 column: 10
@ -303,7 +393,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 38 row: 38
column: 10 column: 10
@ -313,7 +406,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 39 row: 39
column: 10 column: 10
@ -323,7 +419,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 41 row: 41
column: 10 column: 10
@ -333,7 +432,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 10 column: 10
@ -343,7 +445,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 43 row: 43
column: 10 column: 10
@ -353,7 +458,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 10 column: 10
@ -363,7 +471,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 48 row: 48
column: 11 column: 11
@ -373,7 +484,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 55 row: 55
column: 11 column: 11
@ -383,7 +497,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 62 row: 62
column: 11 column: 11
@ -393,7 +510,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 69 row: 69
column: 11 column: 11
@ -403,7 +523,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 77 row: 77
column: 8 column: 8
@ -413,7 +536,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 83 row: 83
column: 25 column: 25
@ -423,7 +549,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 84 row: 84
column: 25 column: 25
@ -433,7 +562,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 85 row: 85
column: 25 column: 25
@ -443,7 +575,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
HardcodedSQLExpression: ~ name: HardcodedSQLExpression
body: Possible SQL injection vector through string-based query construction
commit: ~
fixable: false
location: location:
row: 86 row: 86
column: 29 column: 29

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
LoggingConfigInsecureListen: ~ name: LoggingConfigInsecureListen
body: "Use of insecure `logging.config.listen` detected"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 4 column: 4

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bandit/mod.rs source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
Jinja2AutoescapeFalse: name: Jinja2AutoescapeFalse
value: true body: "Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function."
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 67 column: 67
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Jinja2AutoescapeFalse: name: Jinja2AutoescapeFalse
value: true body: "Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function."
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 44 column: 44
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Jinja2AutoescapeFalse: name: Jinja2AutoescapeFalse
value: true body: "Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function."
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 23 column: 23
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Jinja2AutoescapeFalse: name: Jinja2AutoescapeFalse
value: false body: "By default, jinja2 sets `autoescape` to `False`. Consider using `autoescape=True` or the `select_autoescape` function to mitigate XSS vulnerabilities."
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 0 column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
Jinja2AutoescapeFalse: name: Jinja2AutoescapeFalse
value: true body: "Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function."
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 46 column: 46

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_blind_except/mod.rs source: crates/ruff/src/rules/flake8_blind_except/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BlindExcept: name: BlindExcept
name: BaseException body: "Do not catch blind exception: `BaseException`"
commit: ~
fixable: false
location: location:
row: 25 row: 25
column: 7 column: 7
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 31 row: 31
column: 7 column: 7
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 7 column: 7
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: BaseException body: "Do not catch blind exception: `BaseException`"
commit: ~
fixable: false
location: location:
row: 45 row: 45
column: 11 column: 11
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 54 row: 54
column: 7 column: 7
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 60 row: 60
column: 7 column: 7
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: BaseException body: "Do not catch blind exception: `BaseException`"
commit: ~
fixable: false
location: location:
row: 62 row: 62
column: 7 column: 7
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 69 row: 69
column: 7 column: 7
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 75 row: 75
column: 7 column: 7
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BlindExcept: name: BlindExcept
name: Exception body: "Do not catch blind exception: `Exception`"
commit: ~
fixable: false
location: location:
row: 81 row: 81
column: 7 column: 7

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_boolean_trap/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 4 column: 4
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 4 column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 4 column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 4 column: 4
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 4 column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 4 column: 4
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 4 column: 4
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalArgInFunctionDefinition: ~ name: BooleanPositionalArgInFunctionDefinition
body: Boolean positional arg in function definition
commit: ~
fixable: false
location: location:
row: 81 row: 81
column: 18 column: 18

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_boolean_trap/mod.rs source: crates/ruff/src/rules/flake8_boolean_trap/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BooleanDefaultValueInFunctionDefinition: ~ name: BooleanDefaultValueInFunctionDefinition
body: Boolean default value in function definition
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 30 column: 30
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanDefaultValueInFunctionDefinition: ~ name: BooleanDefaultValueInFunctionDefinition
body: Boolean default value in function definition
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 42 column: 42
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanDefaultValueInFunctionDefinition: ~ name: BooleanDefaultValueInFunctionDefinition
body: Boolean default value in function definition
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 40 column: 40
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanDefaultValueInFunctionDefinition: ~ name: BooleanDefaultValueInFunctionDefinition
body: Boolean default value in function definition
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 45 column: 45

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_boolean_trap/mod.rs source: crates/ruff/src/rules/flake8_boolean_trap/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BooleanPositionalValueInFunctionCall: ~ name: BooleanPositionalValueInFunctionCall
body: Boolean positional value in function call
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 10 column: 10
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalValueInFunctionCall: ~ name: BooleanPositionalValueInFunctionCall
body: Boolean positional value in function call
commit: ~
fixable: false
location: location:
row: 57 row: 57
column: 10 column: 10
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BooleanPositionalValueInFunctionCall: ~ name: BooleanPositionalValueInFunctionCall
body: Boolean positional value in function call
commit: ~
fixable: false
location: location:
row: 57 row: 57
column: 16 column: 16

View file

@ -6,7 +6,7 @@ use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;
#[violation] #[violation]

View file

@ -11,7 +11,7 @@ use ruff_python_ast::types::{CallPath, Range};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::{Diagnostic, Rule}; use crate::registry::{AsRule, Diagnostic, Rule};
use crate::violation::{AlwaysAutofixableViolation, Violation}; use crate::violation::{AlwaysAutofixableViolation, Violation};
#[violation] #[violation]

View file

@ -8,7 +8,7 @@ use ruff_python_stdlib::keyword::KWLIST;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;
#[violation] #[violation]

View file

@ -6,7 +6,7 @@ use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;
#[violation] #[violation]

View file

@ -9,7 +9,7 @@ use ruff_python_stdlib::keyword::KWLIST;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;
#[violation] #[violation]

View file

@ -29,7 +29,7 @@ use ruff_python_ast::{helpers, visitor};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::fix::Fix; use crate::fix::Fix;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::violation::{AutofixKind, Availability, Violation}; use crate::violation::{AutofixKind, Availability, Violation};
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize, result_like::BoolLike)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize, result_like::BoolLike)]

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UnaryPrefixIncrement: ~ name: UnaryPrefixIncrement
body: Python does not support the unary prefix increment
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 8 column: 8
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnaryPrefixIncrement: ~ name: UnaryPrefixIncrement
body: Python does not support the unary prefix increment
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 11 column: 11

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
AssignmentToOsEnviron: ~ name: AssignmentToOsEnviron
body: "Assigning to `os.environ` doesn't clear the environment"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UnreliableCallableCheck: ~ name: UnreliableCallableCheck
body: "Using `hasattr(x, '__call__')` to test if x is callable is unreliable. Use `callable(x)` for consistent results."
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 7 column: 7
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnreliableCallableCheck: ~ name: UnreliableCallableCheck
body: "Using `hasattr(x, '__call__')` to test if x is callable is unreliable. Use `callable(x)` for consistent results."
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 7 column: 7

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 0 column: 0
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 0 column: 0
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 0 column: 0
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StripWithMultiCharacters: ~ name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 0 column: 0

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 60 row: 60
column: 24 column: 24
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 64 row: 64
column: 29 column: 29
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 68 row: 68
column: 19 column: 19
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 72 row: 72
column: 19 column: 19
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 76 row: 76
column: 31 column: 31
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 80 row: 80
column: 25 column: 25
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 85 row: 85
column: 45 column: 45
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 89 row: 89
column: 45 column: 45
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 93 row: 93
column: 44 column: 44
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 97 row: 97
column: 32 column: 32
@ -103,7 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 170 row: 170
column: 19 column: 19
@ -113,7 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 203 row: 203
column: 26 column: 26
@ -123,7 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 204 row: 204
column: 34 column: 34
@ -133,7 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
MutableArgumentDefault: ~ name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location: location:
row: 205 row: 205
column: 61 column: 61

View file

@ -3,10 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: i body: "Loop control variable `i` not used within loop body"
rename: _i commit: "Rename unused `i` to `_i`"
certainty: Certain fixable: true
location: location:
row: 6 row: 6
column: 4 column: 4
@ -16,10 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: k body: "Loop control variable `k` not used within loop body"
rename: _k commit: "Rename unused `k` to `_k`"
certainty: Certain fixable: true
location: location:
row: 18 row: 18
column: 12 column: 12
@ -36,10 +36,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: i body: "Loop control variable `i` not used within loop body"
rename: _i commit: "Rename unused `i` to `_i`"
certainty: Certain fixable: true
location: location:
row: 30 row: 30
column: 4 column: 4
@ -49,10 +49,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: k body: "Loop control variable `k` not used within loop body"
rename: _k commit: "Rename unused `k` to `_k`"
certainty: Certain fixable: true
location: location:
row: 30 row: 30
column: 12 column: 12
@ -69,10 +69,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` may not be used within loop body"
rename: _bar commit: ~
certainty: Uncertain fixable: false
location: location:
row: 34 row: 34
column: 9 column: 9
@ -82,10 +82,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` may not be used within loop body"
rename: _bar commit: ~
certainty: Uncertain fixable: false
location: location:
row: 38 row: 38
column: 9 column: 9
@ -95,10 +95,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` may not be used within loop body"
rename: _bar commit: ~
certainty: Uncertain fixable: false
location: location:
row: 42 row: 42
column: 9 column: 9
@ -108,10 +108,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` may not be used within loop body"
rename: _bar commit: ~
certainty: Uncertain fixable: false
location: location:
row: 46 row: 46
column: 9 column: 9
@ -121,10 +121,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` not used within loop body"
rename: _bar commit: "Rename unused `bar` to `_bar`"
certainty: Certain fixable: true
location: location:
row: 52 row: 52
column: 13 column: 13
@ -141,10 +141,10 @@ expression: diagnostics
column: 16 column: 16
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` not used within loop body"
rename: _bar commit: "Rename unused `bar` to `_bar`"
certainty: Certain fixable: true
location: location:
row: 59 row: 59
column: 13 column: 13
@ -154,10 +154,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` not used within loop body"
rename: _bar commit: "Rename unused `bar` to `_bar`"
certainty: Certain fixable: true
location: location:
row: 68 row: 68
column: 13 column: 13
@ -174,10 +174,10 @@ expression: diagnostics
column: 16 column: 16
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: bar body: "Loop control variable `bar` not used within loop body"
rename: _bar commit: "Rename unused `bar` to `_bar`"
certainty: Certain fixable: true
location: location:
row: 77 row: 77
column: 13 column: 13
@ -194,10 +194,10 @@ expression: diagnostics
column: 16 column: 16
parent: ~ parent: ~
- kind: - kind:
UnusedLoopControlVariable: name: UnusedLoopControlVariable
name: line_ body: "Loop control variable `line_` not used within loop body"
rename: ~ commit: ~
certainty: Certain fixable: false
location: location:
row: 87 row: 87
column: 4 column: 4

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: range body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location: location:
row: 85 row: 85
column: 60 column: 60
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: range body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location: location:
row: 89 row: 89
column: 63 column: 63
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: range body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location: location:
row: 93 row: 93
column: 59 column: 59
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: time.time body: "Do not perform function call `time.time` in argument defaults"
commit: ~
fixable: false
location: location:
row: 109 row: 109
column: 38 column: 38
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: dt.datetime.now body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location: location:
row: 113 row: 113
column: 11 column: 11
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: dt.timedelta body: "Do not perform function call `dt.timedelta` in argument defaults"
commit: ~
fixable: false
location: location:
row: 113 row: 113
column: 31 column: 31
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: ~ body: Do not perform function call in argument defaults
commit: ~
fixable: false
location: location:
row: 117 row: 117
column: 29 column: 29
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: float body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location: location:
row: 155 row: 155
column: 33 column: 33
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: float body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location: location:
row: 160 row: 160
column: 29 column: 29
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: float body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location: location:
row: 164 row: 164
column: 44 column: 44
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: float body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location: location:
row: 170 row: 170
column: 20 column: 20
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: dt.datetime.now body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location: location:
row: 170 row: 170
column: 30 column: 30
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: map body: "Do not perform function call `map` in argument defaults"
commit: ~
fixable: false
location: location:
row: 176 row: 176
column: 21 column: 21
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: random.randint body: "Do not perform function call `random.randint` in argument defaults"
commit: ~
fixable: false
location: location:
row: 181 row: 181
column: 18 column: 18
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: dt.datetime.now body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location: location:
row: 181 row: 181
column: 36 column: 36

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 19 row: 19
column: 0 column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 19 column: 19
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 20 row: 20
column: 0 column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 23 column: 23
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 21 row: 21
column: 0 column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 26 column: 26
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 22 row: 22
column: 0 column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 22 column: 22
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 23 row: 23
column: 0 column: 0
@ -88,7 +103,10 @@ expression: diagnostics
column: 23 column: 23
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 24 row: 24
column: 14 column: 14
@ -105,7 +123,10 @@ expression: diagnostics
column: 31 column: 31
parent: ~ parent: ~
- kind: - kind:
GetAttrWithConstant: ~ name: GetAttrWithConstant
body: "Do not call `getattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `getattr` with attribute access"
fixable: true
location: location:
row: 25 row: 25
column: 3 column: 3

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 40 row: 40
column: 0 column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 25 column: 25
parent: ~ parent: ~
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 41 row: 41
column: 0 column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 29 column: 29
parent: ~ parent: ~
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 42 row: 42
column: 0 column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 32 column: 32
parent: ~ parent: ~
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 43 row: 43
column: 0 column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 28 column: 28
parent: ~ parent: ~
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 44 row: 44
column: 0 column: 0
@ -88,7 +103,10 @@ expression: diagnostics
column: 29 column: 29
parent: ~ parent: ~
- kind: - kind:
SetAttrWithConstant: ~ name: SetAttrWithConstant
body: "Do not call `setattr` with a constant attribute value. It is not any safer than normal property access."
commit: "Replace `setattr` with assignment"
fixable: true
location: location:
row: 45 row: 45
column: 0 column: 0

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
AssertFalse: ~ name: AssertFalse
body: "Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`"
commit: "Replace `assert False`"
fixable: true
location: location:
row: 8 row: 8
column: 7 column: 7
@ -20,7 +23,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
AssertFalse: ~ name: AssertFalse
body: "Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`"
commit: "Replace `assert False`"
fixable: true
location: location:
row: 10 row: 10
column: 7 column: 7

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 8 column: 8
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 12 column: 12
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 12 column: 12
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 31 row: 31
column: 12 column: 12
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 20 column: 20
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: break body: "`break` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 66 row: 66
column: 12 column: 12
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: continue body: "`continue` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 78 row: 78
column: 12 column: 12
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: return body: "`return` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 94 row: 94
column: 12 column: 12
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: continue body: "`continue` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 101 row: 101
column: 8 column: 8
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: break body: "`break` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 107 row: 107
column: 8 column: 8
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
JumpStatementInFinally: name: JumpStatementInFinally
name: break body: "`break` inside `finally` blocks cause exceptions to be silenced"
commit: ~
fixable: false
location: location:
row: 118 row: 118
column: 16 column: 16

View file

@ -3,8 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
RedundantTupleInExceptionHandler: name: RedundantTupleInExceptionHandler
name: ValueError body: "A length-one tuple literal is redundant. Write `except ValueError` instead of `except (ValueError,)`."
commit: "Replace with `except ValueError`"
fixable: true
location: location:
row: 3 row: 3
column: 7 column: 7

View file

@ -3,9 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
DuplicateHandlerException: name: DuplicateHandlerException
names: body: "Exception handler with duplicate exception: `OSError`"
- OSError commit: De-duplicate exceptions
fixable: true
location: location:
row: 17 row: 17
column: 7 column: 7
@ -22,9 +23,10 @@ expression: diagnostics
column: 25 column: 25
parent: ~ parent: ~
- kind: - kind:
DuplicateHandlerException: name: DuplicateHandlerException
names: body: "Exception handler with duplicate exception: `MyError`"
- MyError commit: De-duplicate exceptions
fixable: true
location: location:
row: 28 row: 28
column: 7 column: 7
@ -41,9 +43,10 @@ expression: diagnostics
column: 25 column: 25
parent: ~ parent: ~
- kind: - kind:
DuplicateHandlerException: name: DuplicateHandlerException
names: body: "Exception handler with duplicate exception: `re.error`"
- re.error commit: De-duplicate exceptions
fixable: true
location: location:
row: 49 row: 49
column: 7 column: 7

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UselessComparison: ~ name: UselessComparison
body: "Pointless comparison. This comparison does nothing but waste CPU instructions. Either prepend `assert` or remove it."
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessComparison: ~ name: UselessComparison
body: "Pointless comparison. This comparison does nothing but waste CPU instructions. Either prepend `assert` or remove it."
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessComparison: ~ name: UselessComparison
body: "Pointless comparison. This comparison does nothing but waste CPU instructions. Either prepend `assert` or remove it."
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 4 column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessComparison: ~ name: UselessComparison
body: "Pointless comparison. This comparison does nothing but waste CPU instructions. Either prepend `assert` or remove it."
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
CannotRaiseLiteral: ~ name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 6 column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CannotRaiseLiteral: ~ name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 6 column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CannotRaiseLiteral: ~ name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 6 column: 6

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
AssertRaisesException: ~ name: AssertRaisesException
body: "`assertRaises(Exception)` should be considered evil"
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 8 column: 8

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 4 column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 4 column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 4 column: 4
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 15 row: 15
column: 4 column: 4
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 4 column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 4 column: 4
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 4 column: 4
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 4 column: 4
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 4 column: 4
@ -103,7 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4
@ -113,7 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 4 column: 4
@ -123,7 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 39 row: 39
column: 4 column: 4
@ -133,7 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 40 row: 40
column: 4 column: 4
@ -143,7 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 41 row: 41
column: 4 column: 4
@ -153,7 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 4 column: 4
@ -163,7 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 43 row: 43
column: 4 column: 4
@ -173,7 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 44 row: 44
column: 4 column: 4
@ -183,7 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 45 row: 45
column: 4 column: 4
@ -193,7 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 46 row: 46
column: 4 column: 4
@ -203,7 +263,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 47 row: 47
column: 4 column: 4
@ -213,7 +276,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 48 row: 48
column: 4 column: 4
@ -223,7 +289,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 52 row: 52
column: 4 column: 4
@ -233,7 +302,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessExpression: ~ name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location: location:
row: 55 row: 55
column: 4 column: 4

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 78 row: 78
column: 5 column: 5
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 82 row: 82
column: 5 column: 5
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 86 row: 86
column: 5 column: 5
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 90 row: 90
column: 5 column: 5
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 94 row: 94
column: 5 column: 5
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 98 row: 98
column: 5 column: 5
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 102 row: 102
column: 5 column: 5
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
CachedInstanceMethod: ~ name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location: location:
row: 106 row: 106
column: 5 column: 5

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
LoopVariableOverridesIterator: name: LoopVariableOverridesIterator
name: items body: "Loop control variable `items` overrides iterable it iterates"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
LoopVariableOverridesIterator: name: LoopVariableOverridesIterator
name: values body: "Loop control variable `values` overrides iterable it iterates"
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 9 column: 9
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
LoopVariableOverridesIterator: name: LoopVariableOverridesIterator
name: vars body: "Loop control variable `vars` overrides iterable it iterates"
commit: ~
fixable: false
location: location:
row: 36 row: 36
column: 4 column: 4

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 14 row: 14
column: 4 column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 22 row: 22
column: 4 column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 4 column: 4
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 38 row: 38
column: 4 column: 4
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 46 row: 46
column: 4 column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 54 row: 54
column: 4 column: 4
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 62 row: 62
column: 4 column: 4
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 70 row: 70
column: 4 column: 4
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FStringDocstring: ~ name: FStringDocstring
body: f-string used as docstring. This will be interpreted by python as a joined string rather than a docstring.
commit: ~
fixable: false
location: location:
row: 74 row: 74
column: 4 column: 4

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UselessContextlibSuppress: ~ name: UselessContextlibSuppress
body: "No arguments passed to `contextlib.suppress`. No exceptions will be suppressed and therefore this context manager is redundant"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 5 column: 5
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UselessContextlibSuppress: ~ name: UselessContextlibSuppress
body: "No arguments passed to `contextlib.suppress`. No exceptions will be suppressed and therefore this context manager is redundant"
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 5 column: 5

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 29 column: 29
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: y body: "Function definition does not bind loop variable `y`"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 29 column: 29
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 15 column: 15
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 18 column: 18
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 29 row: 29
column: 18 column: 18
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 18 column: 18
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 31 row: 31
column: 21 column: 21
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 40 row: 40
column: 33 column: 33
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 42 row: 42
column: 13 column: 13
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: a body: "Function definition does not bind loop variable `a`"
commit: ~
fixable: false
location: location:
row: 50 row: 50
column: 29 column: 29
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: a_ body: "Function definition does not bind loop variable `a_`"
commit: ~
fixable: false
location: location:
row: 51 row: 51
column: 29 column: 29
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: b body: "Function definition does not bind loop variable `b`"
commit: ~
fixable: false
location: location:
row: 52 row: 52
column: 29 column: 29
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: c body: "Function definition does not bind loop variable `c`"
commit: ~
fixable: false
location: location:
row: 53 row: 53
column: 29 column: 29
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: j body: "Function definition does not bind loop variable `j`"
commit: ~
fixable: false
location: location:
row: 61 row: 61
column: 16 column: 16
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: k body: "Function definition does not bind loop variable `k`"
commit: ~
fixable: false
location: location:
row: 61 row: 61
column: 20 column: 20
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: l body: "Function definition does not bind loop variable `l`"
commit: ~
fixable: false
location: location:
row: 68 row: 68
column: 9 column: 9
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: i body: "Function definition does not bind loop variable `i`"
commit: ~
fixable: false
location: location:
row: 82 row: 82
column: 15 column: 15
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 117 row: 117
column: 23 column: 23
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 118 row: 118
column: 26 column: 26
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 119 row: 119
column: 36 column: 36
@ -223,8 +263,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 120 row: 120
column: 37 column: 37
@ -234,8 +276,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: x body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location: location:
row: 121 row: 121
column: 36 column: 36
@ -245,8 +289,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: name body: "Function definition does not bind loop variable `name`"
commit: ~
fixable: false
location: location:
row: 171 row: 171
column: 28 column: 28
@ -256,8 +302,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
FunctionUsesLoopVariable: name: FunctionUsesLoopVariable
name: i body: "Function definition does not bind loop variable `i`"
commit: ~
fixable: false
location: location:
row: 174 row: 174
column: 28 column: 28

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: Base_1 body: "`Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 0 column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: MetaBase_1 body: "`MetaBase_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 71 row: 71
column: 0 column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: abc_Base_1 body: "`abc_Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 82 row: 82
column: 0 column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: abc_Base_2 body: "`abc_Base_2` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 87 row: 87
column: 0 column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: notabc_Base_1 body: "`notabc_Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 92 row: 92
column: 0 column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
AbstractBaseClassWithoutAbstractMethod: name: AbstractBaseClassWithoutAbstractMethod
name: abc_set_class_variable_4 body: "`abc_set_class_variable_4` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location: location:
row: 141 row: 141
column: 0 column: 0

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
DuplicateTryBlockException: name: DuplicateTryBlockException
name: ValueError body: "try-except block with duplicate exception `ValueError`"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 7 column: 7
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
DuplicateTryBlockException: name: DuplicateTryBlockException
name: pickle.PickleError body: "try-except block with duplicate exception `pickle.PickleError`"
commit: ~
fixable: false
location: location:
row: 28 row: 28
column: 7 column: 7
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
DuplicateTryBlockException: name: DuplicateTryBlockException
name: ValueError body: "try-except block with duplicate exception `ValueError`"
commit: ~
fixable: false
location: location:
row: 35 row: 35
column: 7 column: 7
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
DuplicateTryBlockException: name: DuplicateTryBlockException
name: TypeError body: "try-except block with duplicate exception `TypeError`"
commit: ~
fixable: false
location: location:
row: 37 row: 37
column: 17 column: 17

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 15 column: 15
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 15 column: 15
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 26 column: 26
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 37 column: 37
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 15 column: 15
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 20 row: 20
column: 25 column: 25
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
StarArgUnpackingAfterKeywordArg: ~ name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 25 column: 25

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
EmptyMethodWithoutAbstractDecorator: name: EmptyMethodWithoutAbstractDecorator
name: AbstractClass.empty_1 body: "`AbstractClass.empty_1` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
EmptyMethodWithoutAbstractDecorator: name: EmptyMethodWithoutAbstractDecorator
name: AbstractClass.empty_2 body: "`AbstractClass.empty_2` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 4 column: 4
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
EmptyMethodWithoutAbstractDecorator: name: EmptyMethodWithoutAbstractDecorator
name: AbstractClass.empty_3 body: "`AbstractClass.empty_3` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 4 column: 4
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
EmptyMethodWithoutAbstractDecorator: name: EmptyMethodWithoutAbstractDecorator
name: AbstractClass.empty_4 body: "`AbstractClass.empty_4` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location: location:
row: 23 row: 23
column: 4 column: 4

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
ExceptWithEmptyTuple: ~ name: ExceptWithEmptyTuple
body: "Using except (): with an empty tuple does not handle/catch anything. Add exceptions to handle."
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ExceptWithEmptyTuple: ~ name: ExceptWithEmptyTuple
body: "Using except (): with an empty tuple does not handle/catch anything. Add exceptions to handle."
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 12 row: 12
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 0 column: 0
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 17 row: 17
column: 0 column: 0
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 18 row: 18
column: 0 column: 0
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
UnintentionalTypeAnnotation: ~ name: UnintentionalTypeAnnotation
body: "Possible unintentional type annotation (using `:`). Did you mean to assign (using `=`)?"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 0 column: 0

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 10 row: 10
column: 8 column: 8
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 4 column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 62 row: 62
column: 8 column: 8
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 64 row: 64
column: 8 column: 8
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
RaiseWithoutFromInsideExcept: ~ name: RaiseWithoutFromInsideExcept
body: "Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling"
commit: ~
fixable: false
location: location:
row: 72 row: 72
column: 12 column: 12

View file

@ -1,9 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 0 column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 0 column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 0 column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 15 column: 15
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 4 column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
ZipWithoutExplicitStrict: ~ name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_bugbear/mod.rs source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
FunctionCallArgumentDefault: name: FunctionCallArgumentDefault
name: Depends body: "Do not perform function call `Depends` in argument defaults"
commit: ~
fixable: false
location: location:
row: 19 row: 19
column: 50 column: 50

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: sum body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 0 column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: int body: "Variable `int` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 0 column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: dir body: "Variable `dir` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 0 column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: print body: "Variable `print` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: copyright body: "Variable `copyright` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: complex body: "Variable `complex` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 1 column: 1
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: float body: "Variable `float` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: object body: "Variable `object` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 8 column: 8
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: min body: "Variable `min` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: max body: "Variable `max` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 5 column: 5
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: id body: "Variable `id` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 0 column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: bytes body: "Variable `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: slice body: "Variable `slice` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 0 column: 0
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: ValueError body: "Variable `ValueError` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 0 column: 0
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: memoryview body: "Variable `memoryview` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: bytearray body: "Variable `bytearray` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 17 column: 17
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: str body: "Variable `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 21 column: 21
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: all body: "Variable `all` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 44 column: 44
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: any body: "Variable `any` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 49 column: 49
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: sum body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 7 column: 7

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: sum body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 0 column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: int body: "Variable `int` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 0 column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: print body: "Variable `print` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 0 column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: copyright body: "Variable `copyright` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 6 row: 6
column: 0 column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: complex body: "Variable `complex` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 7 row: 7
column: 1 column: 1
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: float body: "Variable `float` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 0 column: 0
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: object body: "Variable `object` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 8 column: 8
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: min body: "Variable `min` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 0 column: 0
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: max body: "Variable `max` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 9 row: 9
column: 5 column: 5
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: bytes body: "Variable `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 13 row: 13
column: 0 column: 0
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: slice body: "Variable `slice` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 16 row: 16
column: 0 column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: ValueError body: "Variable `ValueError` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 21 row: 21
column: 0 column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: memoryview body: "Variable `memoryview` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 4 column: 4
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: bytearray body: "Variable `bytearray` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 24 row: 24
column: 17 column: 17
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: str body: "Variable `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 21 column: 21
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: all body: "Variable `all` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 44 column: 44
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: any body: "Variable `any` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 27 row: 27
column: 49 column: 49
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinVariableShadowing: name: BuiltinVariableShadowing
name: sum body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 30 row: 30
column: 7 column: 7

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: str body: "Argument `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 10 column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: type body: "Argument `type` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 18 column: 18
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: complex body: "Argument `complex` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 25 column: 25
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: Exception body: "Argument `Exception` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 34 column: 34
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: getattr body: "Argument `getattr` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 47 column: 47
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: bytes body: "Argument `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 16 column: 16
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: id body: "Argument `id` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 16 column: 16
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: dir body: "Argument `dir` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 8 row: 8
column: 20 column: 20
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: float body: "Argument `float` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 15 column: 15

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: str body: "Argument `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 10 column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: type body: "Argument `type` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 18 column: 18
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: complex body: "Argument `complex` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 25 column: 25
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: Exception body: "Argument `Exception` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 34 column: 34
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: getattr body: "Argument `getattr` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 1 row: 1
column: 47 column: 47
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: bytes body: "Argument `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 5 row: 5
column: 16 column: 16
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinArgumentShadowing: name: BuiltinArgumentShadowing
name: float body: "Argument `float` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 15 column: 15

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: ImportError body: "Class attribute `ImportError` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: id body: "Class attribute `id` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 3 row: 3
column: 4 column: 4
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: dir body: "Class attribute `dir` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 4 row: 4
column: 4 column: 4
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: str body: "Class attribute `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4

View file

@ -1,10 +1,12 @@
--- ---
source: src/rules/flake8_builtins/mod.rs source: crates/ruff/src/rules/flake8_builtins/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: ImportError body: "Class attribute `ImportError` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 2 row: 2
column: 4 column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
BuiltinAttributeShadowing: name: BuiltinAttributeShadowing
name: str body: "Class attribute `str` is shadowing a python builtin"
commit: ~
fixable: false
location: location:
row: 11 row: 11
column: 4 column: 4

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_commas/mod.rs
expression: diagnostics expression: diagnostics
--- ---
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 4 row: 4
column: 17 column: 17
@ -20,7 +23,10 @@ expression: diagnostics
column: 17 column: 17
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 10 row: 10
column: 5 column: 5
@ -37,7 +43,10 @@ expression: diagnostics
column: 5 column: 5
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 16 row: 16
column: 5 column: 5
@ -54,7 +63,10 @@ expression: diagnostics
column: 5 column: 5
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 23 row: 23
column: 5 column: 5
@ -71,7 +83,10 @@ expression: diagnostics
column: 5 column: 5
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 36 row: 36
column: 7 column: 7
@ -81,7 +96,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 38 row: 38
column: 18 column: 18
@ -91,7 +109,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 45 row: 45
column: 7 column: 7
@ -101,7 +122,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 49 row: 49
column: 9 column: 9
@ -111,7 +135,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 56 row: 56
column: 31 column: 31
@ -121,7 +148,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 58 row: 58
column: 25 column: 25
@ -131,7 +161,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaOnBareTupleProhibited: ~ name: TrailingCommaOnBareTupleProhibited
body: Trailing comma on bare tuple prohibited
commit: ~
fixable: false
location: location:
row: 61 row: 61
column: 16 column: 16
@ -141,7 +174,10 @@ expression: diagnostics
fix: ~ fix: ~
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 70 row: 70
column: 7 column: 7
@ -158,7 +194,10 @@ expression: diagnostics
column: 7 column: 7
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 78 row: 78
column: 7 column: 7
@ -175,7 +214,10 @@ expression: diagnostics
column: 7 column: 7
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 86 row: 86
column: 7 column: 7
@ -192,7 +234,10 @@ expression: diagnostics
column: 7 column: 7
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 152 row: 152
column: 5 column: 5
@ -209,7 +254,10 @@ expression: diagnostics
column: 5 column: 5
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 158 row: 158
column: 10 column: 10
@ -226,7 +274,10 @@ expression: diagnostics
column: 10 column: 10
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 293 row: 293
column: 14 column: 14
@ -243,7 +294,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 304 row: 304
column: 13 column: 13
@ -260,7 +314,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 310 row: 310
column: 13 column: 13
@ -277,7 +334,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 316 row: 316
column: 9 column: 9
@ -294,7 +354,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 322 row: 322
column: 14 column: 14
@ -311,7 +374,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 368 row: 368
column: 14 column: 14
@ -328,7 +394,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 375 row: 375
column: 14 column: 14
@ -345,7 +414,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 404 row: 404
column: 14 column: 14
@ -362,7 +434,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 432 row: 432
column: 14 column: 14
@ -379,7 +454,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 485 row: 485
column: 20 column: 20
@ -396,7 +474,10 @@ expression: diagnostics
column: 21 column: 21
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 487 row: 487
column: 12 column: 12
@ -413,7 +494,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 489 row: 489
column: 17 column: 17
@ -430,7 +514,10 @@ expression: diagnostics
column: 18 column: 18
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 494 row: 494
column: 5 column: 5
@ -447,7 +534,10 @@ expression: diagnostics
column: 6 column: 6
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 496 row: 496
column: 20 column: 20
@ -464,7 +554,10 @@ expression: diagnostics
column: 21 column: 21
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 498 row: 498
column: 12 column: 12
@ -481,7 +574,10 @@ expression: diagnostics
column: 13 column: 13
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 500 row: 500
column: 17 column: 17
@ -498,7 +594,10 @@ expression: diagnostics
column: 18 column: 18
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 505 row: 505
column: 5 column: 5
@ -515,7 +614,10 @@ expression: diagnostics
column: 6 column: 6
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 511 row: 511
column: 9 column: 9
@ -532,7 +634,10 @@ expression: diagnostics
column: 10 column: 10
parent: ~ parent: ~
- kind: - kind:
TrailingCommaProhibited: ~ name: TrailingCommaProhibited
body: Trailing comma prohibited
commit: Remove trailing comma
fixable: true
location: location:
row: 513 row: 513
column: 8 column: 8
@ -549,7 +654,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 519 row: 519
column: 12 column: 12
@ -566,7 +674,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 526 row: 526
column: 9 column: 9
@ -583,7 +694,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 534 row: 534
column: 15 column: 15
@ -600,7 +714,10 @@ expression: diagnostics
column: 15 column: 15
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 541 row: 541
column: 12 column: 12
@ -617,7 +734,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 547 row: 547
column: 23 column: 23
@ -634,7 +754,10 @@ expression: diagnostics
column: 23 column: 23
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 554 row: 554
column: 14 column: 14
@ -651,7 +774,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 561 row: 561
column: 12 column: 12
@ -668,7 +794,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 565 row: 565
column: 12 column: 12
@ -685,7 +814,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 573 row: 573
column: 9 column: 9
@ -702,7 +834,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 577 row: 577
column: 9 column: 9
@ -719,7 +854,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 583 row: 583
column: 9 column: 9
@ -736,7 +874,10 @@ expression: diagnostics
column: 9 column: 9
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 590 row: 590
column: 12 column: 12
@ -753,7 +894,10 @@ expression: diagnostics
column: 12 column: 12
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 598 row: 598
column: 14 column: 14
@ -770,7 +914,10 @@ expression: diagnostics
column: 14 column: 14
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 627 row: 627
column: 19 column: 19
@ -787,7 +934,10 @@ expression: diagnostics
column: 19 column: 19
parent: ~ parent: ~
- kind: - kind:
TrailingCommaMissing: ~ name: TrailingCommaMissing
body: Trailing comma missing
commit: Add trailing comma
fixable: true
location: location:
row: 632 row: 632
column: 41 column: 41

View file

@ -5,7 +5,7 @@ use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::rules::flake8_comprehensions::fixes; use crate::rules::flake8_comprehensions::fixes;
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;

View file

@ -5,7 +5,7 @@ use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::rules::flake8_comprehensions::fixes; use crate::rules::flake8_comprehensions::fixes;
use crate::rules::flake8_comprehensions::settings::Settings; use crate::rules::flake8_comprehensions::settings::Settings;
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;

View file

@ -5,7 +5,7 @@ use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::rules::flake8_comprehensions::fixes; use crate::rules::flake8_comprehensions::fixes;
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;

View file

@ -4,7 +4,7 @@ use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::types::Range; use ruff_python_ast::types::Range;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::registry::Diagnostic; use crate::registry::{AsRule, Diagnostic};
use crate::rules::flake8_comprehensions::fixes; use crate::rules::flake8_comprehensions::fixes;
use crate::violation::AlwaysAutofixableViolation; use crate::violation::AlwaysAutofixableViolation;

Some files were not shown because too many files have changed in this diff Show more