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 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::types::Range;
use crate::fix::Fix;
use crate::linter::FixTable;
use crate::registry::{AsRule, Diagnostic};
pub mod helpers;
/// 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 {
use rustpython_parser::ast::Location;
use ruff_python_ast::source_code::Locator;
use crate::autofix::{apply_fix, apply_fixes};
use crate::fix::Fix;
use crate::registry::Diagnostic;
use crate::rules::pycodestyle::rules::NoNewLineAtEndOfFile;
use ruff_python_ast::source_code::Locator;
#[test]
fn empty_file() {
let fixes: Vec<Diagnostic> = vec![];

View file

@ -36,7 +36,7 @@ use crate::checkers::ast::deferred::Deferred;
use crate::docstrings::definition::{
transition_scope, Definition, DefinitionKind, Docstring, Documentable,
};
use crate::registry::{Diagnostic, Rule};
use crate::registry::{AsRule, Diagnostic, Rule};
use crate::rules::{
flake8_2020, flake8_annotations, flake8_bandit, flake8_blind_except, flake8_boolean_trap,
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::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::rules::{
extraneous_whitespace, indentation, missing_whitespace, missing_whitespace_after_keyword,

View file

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

View file

@ -4,7 +4,7 @@ use rustpython_parser::lexer::LexResult;
use rustpython_parser::Tok;
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::{
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::linter::{check_path, LinterResult};
use crate::registry::Rule;
use crate::registry::{AsRule, Rule};
use crate::rules::{
flake8_annotations, flake8_bandit, flake8_bugbear, flake8_builtins, flake8_comprehensions,
flake8_errmsg, flake8_implicit_str_concat, flake8_import_conventions, flake8_pytest_style,
@ -50,17 +50,17 @@ export interface Diagnostic {
"#;
#[derive(Serialize)]
struct ExpandedMessage {
code: SerializeRuleAsCode,
struct ExpandedMessage<'a> {
code: SerializeRuleAsCode<'a>,
message: String,
location: Location,
end_location: Location,
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>
where
S: serde::Serializer,
@ -69,8 +69,8 @@ impl Serialize for SerializeRuleAsCode {
}
}
impl From<Rule> for SerializeRuleAsCode {
fn from(rule: Rule) -> Self {
impl<'a> From<&'a Rule> for SerializeRuleAsCode<'a> {
fn from(rule: &'a Rule) -> Self {
Self(rule)
}
}
@ -207,14 +207,14 @@ pub fn check(contents: &str, options: JsValue) -> Result<JsValue, JsValue> {
let messages: Vec<ExpandedMessage> = diagnostics
.into_iter()
.map(|diagnostic| ExpandedMessage {
code: diagnostic.kind.rule().clone().into(),
message: diagnostic.kind.body(),
location: diagnostic.location,
end_location: diagnostic.end_location,
fix: diagnostic.fix.map(|fix| ExpandedFix {
.map(|message| ExpandedMessage {
code: message.kind.rule().into(),
message: message.kind.body.clone(),
location: message.location,
end_location: message.end_location,
fix: message.fix.map(|fix| ExpandedFix {
content: fix.content,
message: diagnostic.kind.commit(),
message: message.kind.commit,
location: fix.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::message::{Message, Source};
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::settings::{flags, Settings};
use crate::{directives, fs};
@ -202,7 +202,7 @@ pub fn check_path(
if !diagnostics.is_empty() && !settings.per_file_ignores.is_empty() {
let ignores = fs::ignores_from_path(path, &settings.per_file_ignores);
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 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::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(|| {
Regex::new(
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 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::registry::Diagnostic;
use crate::rules::pycodestyle::rules::AmbiguousVariableName;
use crate::rules::pyflakes;
use ruff_python_ast::source_code::LineEnding;
use ruff_python_ast::types::Range;
#[test]
fn regex() {

View file

@ -1,15 +1,16 @@
//! Registry of [`Rule`] to [`DiagnosticKind`] mappings.
use ruff_macros::RuleNamespace;
use rustpython_parser::ast::Location;
use serde::{Deserialize, Serialize};
use strum_macros::{AsRefStr, EnumIter};
use ruff_macros::RuleNamespace;
use ruff_python_ast::types::Range;
use crate::codes::{self, RuleCodePrefix};
use crate::fix::Fix;
use crate::rules;
use crate::violation::Violation;
use ruff_python_ast::types::Range;
ruff_macros::register_rules!(
// 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)]
pub struct Diagnostic {
pub kind: DiagnosticKind,

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/eradicate/mod.rs
expression: diagnostics
---
- kind:
CommentedOutCode: ~
name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location:
row: 1
column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 0
parent: ~
- kind:
CommentedOutCode: ~
name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location:
row: 2
column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 0
parent: ~
- kind:
CommentedOutCode: ~
name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location:
row: 3
column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 0
parent: ~
- kind:
CommentedOutCode: ~
name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location:
row: 5
column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 0
parent: ~
- kind:
CommentedOutCode: ~
name: CommentedOutCode
body: Found commented-out code
commit: Remove commented-out code
fixable: true
location:
row: 12
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
---
- kind:
SysVersionSlice3Referenced: ~
name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 6
column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionSlice3Referenced: ~
name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 7
column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionSlice3Referenced: ~
name: SysVersionSlice3Referenced
body: "`sys.version[:3]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 8
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
---
- kind:
SysVersion2Referenced: ~
name: SysVersion2Referenced
body: "`sys.version[2]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 4
column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersion2Referenced: ~
name: SysVersion2Referenced
body: "`sys.version[2]` referenced (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 5
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
---
- kind:
SysVersionCmpStr3: ~
name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr3: ~
name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 5
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr3: ~
name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 6
column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr3: ~
name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 7
column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr3: ~
name: SysVersionCmpStr3
body: "`sys.version` compared to string (python3.10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 8
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
---
- kind:
SysVersionInfo0Eq3Referenced: ~
name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location:
row: 7
column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionInfo0Eq3Referenced: ~
name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location:
row: 8
column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionInfo0Eq3Referenced: ~
name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location:
row: 9
column: 6
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionInfo0Eq3Referenced: ~
name: SysVersionInfo0Eq3Referenced
body: "`sys.version_info[0] == 3` referenced (python4), use `>=`"
commit: ~
fixable: false
location:
row: 10
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
---
- kind:
SixPY3Referenced: ~
name: SixPY3Referenced
body: "`six.PY3` referenced (python4), use `not six.PY2`"
commit: ~
fixable: false
location:
row: 4
column: 3
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SixPY3Referenced: ~
name: SixPY3Referenced
body: "`six.PY3` referenced (python4), use `not six.PY2`"
commit: ~
fixable: false
location:
row: 6
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
---
- kind:
SysVersionInfo1CmpInt: ~
name: SysVersionInfo1CmpInt
body: "`sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionInfo1CmpInt: ~
name: SysVersionInfo1CmpInt
body: "`sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location:
row: 5
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
---
- kind:
SysVersionInfoMinorCmpInt: ~
name: SysVersionInfoMinorCmpInt
body: "`sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionInfoMinorCmpInt: ~
name: SysVersionInfoMinorCmpInt
body: "`sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple"
commit: ~
fixable: false
location:
row: 5
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
---
- kind:
SysVersion0Referenced: ~
name: SysVersion0Referenced
body: "`sys.version[0]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 4
column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersion0Referenced: ~
name: SysVersion0Referenced
body: "`sys.version[0]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 5
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
---
- kind:
SysVersionCmpStr10: ~
name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr10: ~
name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 5
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr10: ~
name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 6
column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr10: ~
name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 7
column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionCmpStr10: ~
name: SysVersionCmpStr10
body: "`sys.version` compared to string (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 8
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
---
- kind:
SysVersionSlice1Referenced: ~
name: SysVersionSlice1Referenced
body: "`sys.version[:1]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 4
column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SysVersionSlice1Referenced: ~
name: SysVersionSlice1Referenced
body: "`sys.version[:1]` referenced (python10), use `sys.version_info`"
commit: ~
fixable: false
location:
row: 5
column: 6

View file

@ -11,7 +11,7 @@ use ruff_python_ast::{cast, helpers};
use crate::checkers::ast::Checker;
use crate::docstrings::definition::{Definition, DefinitionKind};
use crate::registry::{Diagnostic, Rule};
use crate::registry::{AsRule, Diagnostic, Rule};
use crate::violation::{AlwaysAutofixableViolation, Violation};
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
---
- kind:
MissingReturnTypePublicFunction:
name: bar
name: MissingReturnTypePublicFunction
body: "Missing return type annotation for public function `bar`"
commit: ~
fixable: false
location:
row: 29
column: 8

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bandit/mod.rs
expression: diagnostics
---
- kind:
TryExceptContinue: ~
name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location:
row: 3
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
TryExceptContinue: ~
name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location:
row: 8
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
TryExceptContinue: ~
name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location:
row: 13
column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
TryExceptContinue: ~
name: TryExceptContinue
body: "`try`-`except`-`continue` detected, consider logging the exception"
commit: ~
fixable: false
location:
row: 18
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
---
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 3
column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 4
column: 42
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 6
column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 7
column: 43
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 9
column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 10
column: 42
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 12
column: 0
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 13
column: 45
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 15
column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 16
column: 44
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 18
column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 19
column: 46
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: ~
name: RequestWithoutTimeout
body: Probable use of requests call without timeout
commit: ~
fixable: false
location:
row: 21
column: 0
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithoutTimeout:
timeout: None
name: RequestWithoutTimeout
body: "Probable use of requests call with timeout set to `None`"
commit: ~
fixable: false
location:
row: 22
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
---
- kind:
HashlibInsecureHashFunction:
string: md5
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location:
row: 7
column: 12
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: md4
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `md4`"
commit: ~
fixable: false
location:
row: 9
column: 12
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: md5
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location:
row: 11
column: 17
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: MD4
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `MD4`"
commit: ~
fixable: false
location:
row: 13
column: 12
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha1
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location:
row: 15
column: 12
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha1
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location:
row: 17
column: 12
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha`"
commit: ~
fixable: false
location:
row: 19
column: 12
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: SHA
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `SHA`"
commit: ~
fixable: false
location:
row: 21
column: 17
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha`"
commit: ~
fixable: false
location:
row: 23
column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: md5
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `md5`"
commit: ~
fixable: false
location:
row: 25
column: 0
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha1
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location:
row: 27
column: 12
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha1
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location:
row: 29
column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
HashlibInsecureHashFunction:
string: sha1
name: HashlibInsecureHashFunction
body: "Probable use of insecure hash functions in `hashlib`: `sha1`"
commit: ~
fixable: false
location:
row: 32
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
---
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 5
column: 53
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 7
column: 54
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 9
column: 53
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 11
column: 56
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 13
column: 55
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 15
column: 57
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: requests
name: RequestWithNoCertValidation
body: "Probable use of `requests` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 17
column: 54
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 20
column: 49
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 22
column: 38
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 24
column: 42
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 26
column: 39
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 28
column: 39
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 30
column: 38
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 32
column: 40
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 34
column: 41
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 36
column: 41
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 38
column: 20
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
RequestWithNoCertValidation:
string: httpx
name: RequestWithNoCertValidation
body: "Probable use of `httpx` call with `verify=False` disabling SSL certificate checks"
commit: ~
fixable: false
location:
row: 40
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
---
- kind:
UnsafeYAMLLoad:
loader: ~
name: UnsafeYAMLLoad
body: "Probable use of unsafe `yaml.load`. Allows instantiation of arbitrary objects. Consider `yaml.safe_load`."
commit: ~
fixable: false
location:
row: 10
column: 8
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnsafeYAMLLoad:
loader: Loader
name: UnsafeYAMLLoad
body: "Probable use of unsafe loader `Loader` with `yaml.load`. Allows instantiation of arbitrary objects. Consider `yaml.safe_load`."
commit: ~
fixable: false
location:
row: 24
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
---
- kind:
SnmpInsecureVersion: ~
name: SnmpInsecureVersion
body: The use of SNMPv1 and SNMPv2 is insecure. Use SNMPv3 if able.
commit: ~
fixable: false
location:
row: 3
column: 32
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SnmpInsecureVersion: ~
name: SnmpInsecureVersion
body: The use of SNMPv1 and SNMPv2 is insecure. Use SNMPv3 if able.
commit: ~
fixable: false
location:
row: 4
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
---
- kind:
SnmpWeakCryptography: ~
name: SnmpWeakCryptography
body: "You should not use SNMPv3 without encryption. `noAuthNoPriv` & `authNoPriv` is insecure."
commit: ~
fixable: false
location:
row: 4
column: 11
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
SnmpWeakCryptography: ~
name: SnmpWeakCryptography
body: "You should not use SNMPv3 without encryption. `noAuthNoPriv` & `authNoPriv` is insecure."
commit: ~
fixable: false
location:
row: 5
column: 15

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -29,7 +29,7 @@ use ruff_python_ast::{helpers, visitor};
use crate::checkers::ast::Checker;
use crate::fix::Fix;
use crate::registry::Diagnostic;
use crate::registry::{AsRule, Diagnostic};
use crate::violation::{AutofixKind, Availability, Violation};
#[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
---
- kind:
UnaryPrefixIncrement: ~
name: UnaryPrefixIncrement
body: Python does not support the unary prefix increment
commit: ~
fixable: false
location:
row: 15
column: 8
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnaryPrefixIncrement: ~
name: UnaryPrefixIncrement
body: Python does not support the unary prefix increment
commit: ~
fixable: false
location:
row: 20
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
---
- kind:
AssignmentToOsEnviron: ~
name: AssignmentToOsEnviron
body: "Assigning to `os.environ` doesn't clear the environment"
commit: ~
fixable: false
location:
row: 9
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
---
- 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:
row: 3
column: 7
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 5
column: 7

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 7
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 10
column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 13
column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 16
column: 0
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 19
column: 0
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 22
column: 0
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StripWithMultiCharacters: ~
name: StripWithMultiCharacters
body: "Using `.strip()` with multi-character strings is misleading the reader"
commit: ~
fixable: false
location:
row: 24
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
---
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 60
column: 24
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 64
column: 29
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 68
column: 19
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 72
column: 19
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 76
column: 31
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 80
column: 25
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 85
column: 45
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 89
column: 45
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 93
column: 44
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 97
column: 32
@ -103,7 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 170
column: 19
@ -113,7 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 203
column: 26
@ -123,7 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 204
column: 34
@ -133,7 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
MutableArgumentDefault: ~
name: MutableArgumentDefault
body: Do not use mutable data structures for argument defaults
commit: ~
fixable: false
location:
row: 205
column: 61

View file

@ -3,10 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- kind:
UnusedLoopControlVariable:
name: i
rename: _i
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `i` not used within loop body"
commit: "Rename unused `i` to `_i`"
fixable: true
location:
row: 6
column: 4
@ -16,10 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: k
rename: _k
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `k` not used within loop body"
commit: "Rename unused `k` to `_k`"
fixable: true
location:
row: 18
column: 12
@ -36,10 +36,10 @@ expression: diagnostics
column: 13
parent: ~
- kind:
UnusedLoopControlVariable:
name: i
rename: _i
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `i` not used within loop body"
commit: "Rename unused `i` to `_i`"
fixable: true
location:
row: 30
column: 4
@ -49,10 +49,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: k
rename: _k
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `k` not used within loop body"
commit: "Rename unused `k` to `_k`"
fixable: true
location:
row: 30
column: 12
@ -69,10 +69,10 @@ expression: diagnostics
column: 13
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Uncertain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` may not be used within loop body"
commit: ~
fixable: false
location:
row: 34
column: 9
@ -82,10 +82,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Uncertain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` may not be used within loop body"
commit: ~
fixable: false
location:
row: 38
column: 9
@ -95,10 +95,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Uncertain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` may not be used within loop body"
commit: ~
fixable: false
location:
row: 42
column: 9
@ -108,10 +108,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Uncertain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` may not be used within loop body"
commit: ~
fixable: false
location:
row: 46
column: 9
@ -121,10 +121,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` not used within loop body"
commit: "Rename unused `bar` to `_bar`"
fixable: true
location:
row: 52
column: 13
@ -141,10 +141,10 @@ expression: diagnostics
column: 16
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` not used within loop body"
commit: "Rename unused `bar` to `_bar`"
fixable: true
location:
row: 59
column: 13
@ -154,10 +154,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` not used within loop body"
commit: "Rename unused `bar` to `_bar`"
fixable: true
location:
row: 68
column: 13
@ -174,10 +174,10 @@ expression: diagnostics
column: 16
parent: ~
- kind:
UnusedLoopControlVariable:
name: bar
rename: _bar
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `bar` not used within loop body"
commit: "Rename unused `bar` to `_bar`"
fixable: true
location:
row: 77
column: 13
@ -194,10 +194,10 @@ expression: diagnostics
column: 16
parent: ~
- kind:
UnusedLoopControlVariable:
name: line_
rename: ~
certainty: Certain
name: UnusedLoopControlVariable
body: "Loop control variable `line_` not used within loop body"
commit: ~
fixable: false
location:
row: 87
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
---
- kind:
FunctionCallArgumentDefault:
name: range
name: FunctionCallArgumentDefault
body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location:
row: 85
column: 60
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: range
name: FunctionCallArgumentDefault
body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location:
row: 89
column: 63
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: range
name: FunctionCallArgumentDefault
body: "Do not perform function call `range` in argument defaults"
commit: ~
fixable: false
location:
row: 93
column: 59
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: time.time
name: FunctionCallArgumentDefault
body: "Do not perform function call `time.time` in argument defaults"
commit: ~
fixable: false
location:
row: 109
column: 38
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: dt.datetime.now
name: FunctionCallArgumentDefault
body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location:
row: 113
column: 11
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: dt.timedelta
name: FunctionCallArgumentDefault
body: "Do not perform function call `dt.timedelta` in argument defaults"
commit: ~
fixable: false
location:
row: 113
column: 31
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: ~
name: FunctionCallArgumentDefault
body: Do not perform function call in argument defaults
commit: ~
fixable: false
location:
row: 117
column: 29
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: float
name: FunctionCallArgumentDefault
body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location:
row: 155
column: 33
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: float
name: FunctionCallArgumentDefault
body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location:
row: 160
column: 29
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: float
name: FunctionCallArgumentDefault
body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location:
row: 164
column: 44
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: float
name: FunctionCallArgumentDefault
body: "Do not perform function call `float` in argument defaults"
commit: ~
fixable: false
location:
row: 170
column: 20
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: dt.datetime.now
name: FunctionCallArgumentDefault
body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location:
row: 170
column: 30
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: map
name: FunctionCallArgumentDefault
body: "Do not perform function call `map` in argument defaults"
commit: ~
fixable: false
location:
row: 176
column: 21
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: random.randint
name: FunctionCallArgumentDefault
body: "Do not perform function call `random.randint` in argument defaults"
commit: ~
fixable: false
location:
row: 181
column: 18
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionCallArgumentDefault:
name: dt.datetime.now
name: FunctionCallArgumentDefault
body: "Do not perform function call `dt.datetime.now` in argument defaults"
commit: ~
fixable: false
location:
row: 181
column: 36

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- 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:
row: 19
column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 19
parent: ~
- 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:
row: 20
column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 23
parent: ~
- 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:
row: 21
column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 26
parent: ~
- 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:
row: 22
column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 22
parent: ~
- 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:
row: 23
column: 0
@ -88,7 +103,10 @@ expression: diagnostics
column: 23
parent: ~
- 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:
row: 24
column: 14
@ -105,7 +123,10 @@ expression: diagnostics
column: 31
parent: ~
- 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:
row: 25
column: 3

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- 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:
row: 40
column: 0
@ -20,7 +23,10 @@ expression: diagnostics
column: 25
parent: ~
- 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:
row: 41
column: 0
@ -37,7 +43,10 @@ expression: diagnostics
column: 29
parent: ~
- 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:
row: 42
column: 0
@ -54,7 +63,10 @@ expression: diagnostics
column: 32
parent: ~
- 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:
row: 43
column: 0
@ -71,7 +83,10 @@ expression: diagnostics
column: 28
parent: ~
- 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:
row: 44
column: 0
@ -88,7 +103,10 @@ expression: diagnostics
column: 29
parent: ~
- 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:
row: 45
column: 0

View file

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

View file

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

View file

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

View file

@ -3,9 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- kind:
DuplicateHandlerException:
names:
- OSError
name: DuplicateHandlerException
body: "Exception handler with duplicate exception: `OSError`"
commit: De-duplicate exceptions
fixable: true
location:
row: 17
column: 7
@ -22,9 +23,10 @@ expression: diagnostics
column: 25
parent: ~
- kind:
DuplicateHandlerException:
names:
- MyError
name: DuplicateHandlerException
body: "Exception handler with duplicate exception: `MyError`"
commit: De-duplicate exceptions
fixable: true
location:
row: 28
column: 7
@ -41,9 +43,10 @@ expression: diagnostics
column: 25
parent: ~
- kind:
DuplicateHandlerException:
names:
- re.error
name: DuplicateHandlerException
body: "Exception handler with duplicate exception: `re.error`"
commit: De-duplicate exceptions
fixable: true
location:
row: 49
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
---
- 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:
row: 3
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 7
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 17
column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 24
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
---
- kind:
CannotRaiseLiteral: ~
name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location:
row: 6
column: 6
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CannotRaiseLiteral: ~
name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location:
row: 7
column: 6
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CannotRaiseLiteral: ~
name: CannotRaiseLiteral
body: Cannot raise a literal. Did you intend to return it or raise an Exception?
commit: ~
fixable: false
location:
row: 8
column: 6

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- kind:
AssertRaisesException: ~
name: AssertRaisesException
body: "`assertRaises(Exception)` should be considered evil"
commit: ~
fixable: false
location:
row: 22
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
---
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 11
column: 4
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 12
column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 13
column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 14
column: 4
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 15
column: 4
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 16
column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 17
column: 4
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 18
column: 4
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 19
column: 4
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 20
column: 4
@ -103,7 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 24
column: 4
@ -113,7 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 27
column: 4
@ -123,7 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 39
column: 4
@ -133,7 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 40
column: 4
@ -143,7 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 41
column: 4
@ -153,7 +198,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 42
column: 4
@ -163,7 +211,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 43
column: 4
@ -173,7 +224,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 44
column: 4
@ -183,7 +237,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 45
column: 4
@ -193,7 +250,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 46
column: 4
@ -203,7 +263,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 47
column: 4
@ -213,7 +276,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 48
column: 4
@ -223,7 +289,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 52
column: 4
@ -233,7 +302,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
UselessExpression: ~
name: UselessExpression
body: Found useless expression. Either assign it to a variable or remove it.
commit: ~
fixable: false
location:
row: 55
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
---
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 78
column: 5
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 82
column: 5
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 86
column: 5
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 90
column: 5
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 94
column: 5
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 98
column: 5
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 102
column: 5
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
CachedInstanceMethod: ~
name: CachedInstanceMethod
body: "Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks"
commit: ~
fixable: false
location:
row: 106
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
---
- kind:
LoopVariableOverridesIterator:
name: items
name: LoopVariableOverridesIterator
body: "Loop control variable `items` overrides iterable it iterates"
commit: ~
fixable: false
location:
row: 8
column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
LoopVariableOverridesIterator:
name: values
name: LoopVariableOverridesIterator
body: "Loop control variable `values` overrides iterable it iterates"
commit: ~
fixable: false
location:
row: 21
column: 9
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
LoopVariableOverridesIterator:
name: vars
name: LoopVariableOverridesIterator
body: "Loop control variable `vars` overrides iterable it iterates"
commit: ~
fixable: false
location:
row: 36
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
---
- 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:
row: 1
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 14
column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 22
column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 30
column: 4
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 38
column: 4
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 46
column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 54
column: 4
@ -73,7 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 62
column: 4
@ -83,7 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 70
column: 4
@ -93,7 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 74
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
---
- 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:
row: 9
column: 5
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 12
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
---
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 12
column: 29
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: y
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `y`"
commit: ~
fixable: false
location:
row: 13
column: 29
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 16
column: 15
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 28
column: 18
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 29
column: 18
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 30
column: 18
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 31
column: 21
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 40
column: 33
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 42
column: 13
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: a
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `a`"
commit: ~
fixable: false
location:
row: 50
column: 29
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: a_
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `a_`"
commit: ~
fixable: false
location:
row: 51
column: 29
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: b
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `b`"
commit: ~
fixable: false
location:
row: 52
column: 29
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: c
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `c`"
commit: ~
fixable: false
location:
row: 53
column: 29
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: j
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `j`"
commit: ~
fixable: false
location:
row: 61
column: 16
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: k
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `k`"
commit: ~
fixable: false
location:
row: 61
column: 20
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: l
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `l`"
commit: ~
fixable: false
location:
row: 68
column: 9
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: i
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `i`"
commit: ~
fixable: false
location:
row: 82
column: 15
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 117
column: 23
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 118
column: 26
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 119
column: 36
@ -223,8 +263,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 120
column: 37
@ -234,8 +276,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: x
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `x`"
commit: ~
fixable: false
location:
row: 121
column: 36
@ -245,8 +289,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: name
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `name`"
commit: ~
fixable: false
location:
row: 171
column: 28
@ -256,8 +302,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
FunctionUsesLoopVariable:
name: i
name: FunctionUsesLoopVariable
body: "Function definition does not bind loop variable `i`"
commit: ~
fixable: false
location:
row: 174
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
---
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: Base_1
name: AbstractBaseClassWithoutAbstractMethod
body: "`Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 18
column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: MetaBase_1
name: AbstractBaseClassWithoutAbstractMethod
body: "`MetaBase_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 71
column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: abc_Base_1
name: AbstractBaseClassWithoutAbstractMethod
body: "`abc_Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 82
column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: abc_Base_2
name: AbstractBaseClassWithoutAbstractMethod
body: "`abc_Base_2` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 87
column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: notabc_Base_1
name: AbstractBaseClassWithoutAbstractMethod
body: "`notabc_Base_1` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 92
column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
AbstractBaseClassWithoutAbstractMethod:
name: abc_set_class_variable_4
name: AbstractBaseClassWithoutAbstractMethod
body: "`abc_set_class_variable_4` is an abstract base class, but it has no abstract methods"
commit: ~
fixable: false
location:
row: 141
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
---
- kind:
DuplicateTryBlockException:
name: ValueError
name: DuplicateTryBlockException
body: "try-except block with duplicate exception `ValueError`"
commit: ~
fixable: false
location:
row: 19
column: 7
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
DuplicateTryBlockException:
name: pickle.PickleError
name: DuplicateTryBlockException
body: "try-except block with duplicate exception `pickle.PickleError`"
commit: ~
fixable: false
location:
row: 28
column: 7
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
DuplicateTryBlockException:
name: ValueError
name: DuplicateTryBlockException
body: "try-except block with duplicate exception `ValueError`"
commit: ~
fixable: false
location:
row: 35
column: 7
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
DuplicateTryBlockException:
name: TypeError
name: DuplicateTryBlockException
body: "try-except block with duplicate exception `TypeError`"
commit: ~
fixable: false
location:
row: 37
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
---
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 16
column: 15
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 17
column: 15
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 18
column: 26
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 19
column: 37
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 20
column: 15
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 20
column: 25
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
StarArgUnpackingAfterKeywordArg: ~
name: StarArgUnpackingAfterKeywordArg
body: Star-arg unpacking after a keyword argument is strongly discouraged
commit: ~
fixable: false
location:
row: 21
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
---
- kind:
EmptyMethodWithoutAbstractDecorator:
name: AbstractClass.empty_1
name: EmptyMethodWithoutAbstractDecorator
body: "`AbstractClass.empty_1` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location:
row: 13
column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
EmptyMethodWithoutAbstractDecorator:
name: AbstractClass.empty_2
name: EmptyMethodWithoutAbstractDecorator
body: "`AbstractClass.empty_2` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location:
row: 16
column: 4
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
EmptyMethodWithoutAbstractDecorator:
name: AbstractClass.empty_3
name: EmptyMethodWithoutAbstractDecorator
body: "`AbstractClass.empty_3` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location:
row: 19
column: 4
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
EmptyMethodWithoutAbstractDecorator:
name: AbstractClass.empty_4
name: EmptyMethodWithoutAbstractDecorator
body: "`AbstractClass.empty_4` is an empty method in an abstract base class, but has no abstract decorator"
commit: ~
fixable: false
location:
row: 23
column: 4

View file

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

View file

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

View file

@ -3,7 +3,10 @@ source: crates/ruff/src/rules/flake8_bugbear/mod.rs
expression: diagnostics
---
- 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:
row: 10
column: 8
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 11
column: 4
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 16
column: 4
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 62
column: 8
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 64
column: 8
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- 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:
row: 72
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
---
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 1
column: 0
@ -13,7 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 2
column: 0
@ -23,7 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 3
column: 0
@ -33,7 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 4
column: 0
@ -43,7 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 4
column: 15
@ -53,7 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 5
column: 4
@ -63,7 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
ZipWithoutExplicitStrict: ~
name: ZipWithoutExplicitStrict
body: "`zip()` without an explicit `strict=` parameter"
commit: ~
fixable: false
location:
row: 6
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
---
- kind:
FunctionCallArgumentDefault:
name: Depends
name: FunctionCallArgumentDefault
body: "Do not perform function call `Depends` in argument defaults"
commit: ~
fixable: false
location:
row: 19
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
---
- kind:
BuiltinVariableShadowing:
name: sum
name: BuiltinVariableShadowing
body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: int
name: BuiltinVariableShadowing
body: "Variable `int` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 2
column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: dir
name: BuiltinVariableShadowing
body: "Variable `dir` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 3
column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: print
name: BuiltinVariableShadowing
body: "Variable `print` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 5
column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: copyright
name: BuiltinVariableShadowing
body: "Variable `copyright` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 6
column: 0
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: complex
name: BuiltinVariableShadowing
body: "Variable `complex` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 7
column: 1
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: float
name: BuiltinVariableShadowing
body: "Variable `float` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 0
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: object
name: BuiltinVariableShadowing
body: "Variable `object` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 8
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: min
name: BuiltinVariableShadowing
body: "Variable `min` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 9
column: 0
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: max
name: BuiltinVariableShadowing
body: "Variable `max` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 9
column: 5
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: id
name: BuiltinVariableShadowing
body: "Variable `id` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 11
column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: bytes
name: BuiltinVariableShadowing
body: "Variable `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 13
column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: slice
name: BuiltinVariableShadowing
body: "Variable `slice` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 16
column: 0
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: ValueError
name: BuiltinVariableShadowing
body: "Variable `ValueError` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 21
column: 0
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: memoryview
name: BuiltinVariableShadowing
body: "Variable `memoryview` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 24
column: 4
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: bytearray
name: BuiltinVariableShadowing
body: "Variable `bytearray` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 24
column: 17
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: str
name: BuiltinVariableShadowing
body: "Variable `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 21
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: all
name: BuiltinVariableShadowing
body: "Variable `all` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 44
@ -201,8 +237,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: any
name: BuiltinVariableShadowing
body: "Variable `any` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 49
@ -212,8 +250,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: sum
name: BuiltinVariableShadowing
body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 30
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
---
- kind:
BuiltinVariableShadowing:
name: sum
name: BuiltinVariableShadowing
body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 0
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: int
name: BuiltinVariableShadowing
body: "Variable `int` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 2
column: 0
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: print
name: BuiltinVariableShadowing
body: "Variable `print` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 5
column: 0
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: copyright
name: BuiltinVariableShadowing
body: "Variable `copyright` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 6
column: 0
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: complex
name: BuiltinVariableShadowing
body: "Variable `complex` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 7
column: 1
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: float
name: BuiltinVariableShadowing
body: "Variable `float` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 0
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: object
name: BuiltinVariableShadowing
body: "Variable `object` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 8
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: min
name: BuiltinVariableShadowing
body: "Variable `min` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 9
column: 0
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: max
name: BuiltinVariableShadowing
body: "Variable `max` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 9
column: 5
@ -102,8 +120,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: bytes
name: BuiltinVariableShadowing
body: "Variable `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 13
column: 0
@ -113,8 +133,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: slice
name: BuiltinVariableShadowing
body: "Variable `slice` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 16
column: 0
@ -124,8 +146,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: ValueError
name: BuiltinVariableShadowing
body: "Variable `ValueError` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 21
column: 0
@ -135,8 +159,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: memoryview
name: BuiltinVariableShadowing
body: "Variable `memoryview` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 24
column: 4
@ -146,8 +172,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: bytearray
name: BuiltinVariableShadowing
body: "Variable `bytearray` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 24
column: 17
@ -157,8 +185,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: str
name: BuiltinVariableShadowing
body: "Variable `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 21
@ -168,8 +198,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: all
name: BuiltinVariableShadowing
body: "Variable `all` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 44
@ -179,8 +211,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: any
name: BuiltinVariableShadowing
body: "Variable `any` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 27
column: 49
@ -190,8 +224,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinVariableShadowing:
name: sum
name: BuiltinVariableShadowing
body: "Variable `sum` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 30
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
---
- kind:
BuiltinArgumentShadowing:
name: str
name: BuiltinArgumentShadowing
body: "Argument `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: type
name: BuiltinArgumentShadowing
body: "Argument `type` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 18
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: complex
name: BuiltinArgumentShadowing
body: "Argument `complex` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 25
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: Exception
name: BuiltinArgumentShadowing
body: "Argument `Exception` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 34
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: getattr
name: BuiltinArgumentShadowing
body: "Argument `getattr` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 47
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: bytes
name: BuiltinArgumentShadowing
body: "Argument `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 5
column: 16
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: id
name: BuiltinArgumentShadowing
body: "Argument `id` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 16
@ -80,8 +94,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: dir
name: BuiltinArgumentShadowing
body: "Argument `dir` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 8
column: 20
@ -91,8 +107,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: float
name: BuiltinArgumentShadowing
body: "Argument `float` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 11
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
---
- kind:
BuiltinArgumentShadowing:
name: str
name: BuiltinArgumentShadowing
body: "Argument `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 10
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: type
name: BuiltinArgumentShadowing
body: "Argument `type` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 18
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: complex
name: BuiltinArgumentShadowing
body: "Argument `complex` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 25
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: Exception
name: BuiltinArgumentShadowing
body: "Argument `Exception` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 34
@ -47,8 +55,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: getattr
name: BuiltinArgumentShadowing
body: "Argument `getattr` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 1
column: 47
@ -58,8 +68,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: bytes
name: BuiltinArgumentShadowing
body: "Argument `bytes` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 5
column: 16
@ -69,8 +81,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinArgumentShadowing:
name: float
name: BuiltinArgumentShadowing
body: "Argument `float` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 11
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
---
- kind:
BuiltinAttributeShadowing:
name: ImportError
name: BuiltinAttributeShadowing
body: "Class attribute `ImportError` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 2
column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinAttributeShadowing:
name: id
name: BuiltinAttributeShadowing
body: "Class attribute `id` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 3
column: 4
@ -25,8 +29,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinAttributeShadowing:
name: dir
name: BuiltinAttributeShadowing
body: "Class attribute `dir` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 4
column: 4
@ -36,8 +42,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinAttributeShadowing:
name: str
name: BuiltinAttributeShadowing
body: "Class attribute `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 11
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
---
- kind:
BuiltinAttributeShadowing:
name: ImportError
name: BuiltinAttributeShadowing
body: "Class attribute `ImportError` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 2
column: 4
@ -14,8 +16,10 @@ expression: diagnostics
fix: ~
parent: ~
- kind:
BuiltinAttributeShadowing:
name: str
name: BuiltinAttributeShadowing
body: "Class attribute `str` is shadowing a python builtin"
commit: ~
fixable: false
location:
row: 11
column: 4

View file

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

View file

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

View file

@ -5,7 +5,7 @@ use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::types::Range;
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::settings::Settings;
use crate::violation::AlwaysAutofixableViolation;

View file

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

View file

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

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