Remove Patch abstraction from Fix (#987)

This commit is contained in:
Charlie Marsh 2022-12-01 16:04:42 -05:00 committed by GitHub
parent 2e89cd8802
commit af40e64d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 2594 additions and 2983 deletions

View file

@ -6,7 +6,7 @@ use ropey::RopeBuilder;
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use crate::ast::types::Range; use crate::ast::types::Range;
use crate::autofix::{Fix, Patch}; use crate::autofix::Fix;
use crate::checks::Check; use crate::checks::Check;
use crate::source_code_locator::SourceCodeLocator; use crate::source_code_locator::SourceCodeLocator;
@ -58,36 +58,36 @@ fn apply_fixes<'a>(
) -> (Cow<'a, str>, usize) { ) -> (Cow<'a, str>, usize) {
let mut output = RopeBuilder::new(); let mut output = RopeBuilder::new();
let mut last_pos: Location = Location::new(1, 0); let mut last_pos: Location = Location::new(1, 0);
let mut applied: BTreeSet<&Patch> = BTreeSet::default(); let mut applied: BTreeSet<&Fix> = BTreeSet::default();
let mut num_fixed: usize = 0; let mut num_fixed: usize = 0;
for fix in fixes.sorted_by_key(|fix| fix.patch.location) { for fix in fixes.sorted_by_key(|fix| fix.location) {
// If we already applied an identical fix as part of another correction, skip // If we already applied an identical fix as part of another correction, skip
// any re-application. // any re-application.
if applied.contains(&fix.patch) { if applied.contains(&fix) {
num_fixed += 1; num_fixed += 1;
continue; continue;
} }
// Best-effort approach: if this fix overlaps with a fix we've already applied, // Best-effort approach: if this fix overlaps with a fix we've already applied,
// skip it. // skip it.
if last_pos > fix.patch.location { if last_pos > fix.location {
continue; continue;
} }
// Add all contents from `last_pos` to `fix.patch.location`. // Add all contents from `last_pos` to `fix.location`.
let slice = locator.slice_source_code_range(&Range { let slice = locator.slice_source_code_range(&Range {
location: last_pos, location: last_pos,
end_location: fix.patch.location, end_location: fix.location,
}); });
output.append(&slice); output.append(&slice);
// Add the patch itself. // Add the patch itself.
output.append(&fix.patch.content); output.append(&fix.content);
// Track that the fix was applied. // Track that the fix was applied.
last_pos = fix.patch.end_location; last_pos = fix.end_location;
applied.insert(&fix.patch); applied.insert(fix);
num_fixed += 1; num_fixed += 1;
} }
@ -103,7 +103,7 @@ mod tests {
use rustpython_parser::ast::Location; use rustpython_parser::ast::Location;
use crate::autofix::fixer::apply_fixes; use crate::autofix::fixer::apply_fixes;
use crate::autofix::{Fix, Patch}; use crate::autofix::Fix;
use crate::SourceCodeLocator; use crate::SourceCodeLocator;
#[test] #[test]
@ -118,11 +118,9 @@ mod tests {
#[test] #[test]
fn apply_single_replacement() { fn apply_single_replacement() {
let fixes = vec![Fix { let fixes = vec![Fix {
patch: Patch {
content: "Bar".to_string(), content: "Bar".to_string(),
location: Location::new(1, 8), location: Location::new(1, 8),
end_location: Location::new(1, 14), end_location: Location::new(1, 14),
},
}]; }];
let locator = SourceCodeLocator::new( let locator = SourceCodeLocator::new(
r#" r#"
@ -146,11 +144,9 @@ class A(Bar):
#[test] #[test]
fn apply_single_removal() { fn apply_single_removal() {
let fixes = vec![Fix { let fixes = vec![Fix {
patch: Patch {
content: String::new(), content: String::new(),
location: Location::new(1, 7), location: Location::new(1, 7),
end_location: Location::new(1, 15), end_location: Location::new(1, 15),
},
}]; }];
let locator = SourceCodeLocator::new( let locator = SourceCodeLocator::new(
r#" r#"
@ -175,19 +171,15 @@ class A:
fn apply_double_removal() { fn apply_double_removal() {
let fixes = vec![ let fixes = vec![
Fix { Fix {
patch: Patch {
content: String::new(), content: String::new(),
location: Location::new(1, 7), location: Location::new(1, 7),
end_location: Location::new(1, 16), end_location: Location::new(1, 16),
}, },
},
Fix { Fix {
patch: Patch {
content: String::new(), content: String::new(),
location: Location::new(1, 16), location: Location::new(1, 16),
end_location: Location::new(1, 23), end_location: Location::new(1, 23),
}, },
},
]; ];
let locator = SourceCodeLocator::new( let locator = SourceCodeLocator::new(
r#" r#"
@ -213,19 +205,15 @@ class A:
fn ignore_overlapping_fixes() { fn ignore_overlapping_fixes() {
let fixes = vec![ let fixes = vec![
Fix { Fix {
patch: Patch {
content: String::new(), content: String::new(),
location: Location::new(1, 7), location: Location::new(1, 7),
end_location: Location::new(1, 15), end_location: Location::new(1, 15),
}, },
},
Fix { Fix {
patch: Patch {
content: "ignored".to_string(), content: "ignored".to_string(),
location: Location::new(1, 9), location: Location::new(1, 9),
end_location: Location::new(1, 11), end_location: Location::new(1, 11),
}, },
},
]; ];
let locator = SourceCodeLocator::new( let locator = SourceCodeLocator::new(
r#" r#"

View file

@ -5,55 +5,42 @@ pub mod fixer;
pub mod helpers; pub mod helpers;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct Patch { pub struct Fix {
pub content: String, pub content: String,
pub location: Location, pub location: Location,
pub end_location: Location, pub end_location: Location,
} }
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Fix {
pub patch: Patch,
}
impl Fix { impl Fix {
pub fn deletion(start: Location, end: Location) -> Self { pub fn deletion(start: Location, end: Location) -> Self {
Self { Self {
patch: Patch {
content: String::new(), content: String::new(),
location: start, location: start,
end_location: end, end_location: end,
},
} }
} }
pub fn replacement(content: String, start: Location, end: Location) -> Self { pub fn replacement(content: String, start: Location, end: Location) -> Self {
Self { Self {
patch: Patch {
content, content,
location: start, location: start,
end_location: end, end_location: end,
},
} }
} }
pub fn insertion(content: String, at: Location) -> Self { pub fn insertion(content: String, at: Location) -> Self {
Self { Self {
patch: Patch {
content, content,
location: at, location: at,
end_location: at, end_location: at,
},
} }
} }
pub fn dummy(location: Location) -> Self { pub fn dummy(location: Location) -> Self {
Self { Self {
patch: Patch {
content: String::new(), content: String::new(),
location, location,
end_location: location, end_location: location,
},
} }
} }
} }

View file

@ -2990,7 +2990,7 @@ impl<'a> Checker<'a> {
&deleted, &deleted,
) { ) {
Ok(fix) => { Ok(fix) => {
if fix.patch.content.is_empty() || fix.patch.content == "pass" { if fix.content.is_empty() || fix.content == "pass" {
self.deletions.insert(defined_by); self.deletions.insert(defined_by);
} }
Some(fix) Some(fix)

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 2 row: 2
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 2 row: 2
@ -42,7 +40,6 @@ expression: checks
row: 3 row: 3
column: 6 column: 6
fix: fix:
patch:
content: "" content: ""
location: location:
row: 3 row: 3
@ -58,7 +55,6 @@ expression: checks
row: 5 row: 5
column: 13 column: 13
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5
@ -74,7 +70,6 @@ expression: checks
row: 12 row: 12
column: 16 column: 16
fix: fix:
patch:
content: "" content: ""
location: location:
row: 12 row: 12

View file

@ -11,7 +11,6 @@ expression: checks
row: 6 row: 6
column: 5 column: 5
fix: fix:
patch:
content: _i content: _i
location: location:
row: 6 row: 6
@ -28,7 +27,6 @@ expression: checks
row: 18 row: 18
column: 13 column: 13
fix: fix:
patch:
content: _k content: _k
location: location:
row: 18 row: 18
@ -45,7 +43,6 @@ expression: checks
row: 30 row: 30
column: 5 column: 5
fix: fix:
patch:
content: _i content: _i
location: location:
row: 30 row: 30
@ -62,7 +59,6 @@ expression: checks
row: 30 row: 30
column: 13 column: 13
fix: fix:
patch:
content: _k content: _k
location: location:
row: 30 row: 30

View file

@ -10,7 +10,6 @@ expression: checks
row: 18 row: 18
column: 19 column: 19
fix: fix:
patch:
content: foo.bar content: foo.bar
location: location:
row: 18 row: 18
@ -26,7 +25,6 @@ expression: checks
row: 19 row: 19
column: 23 column: 23
fix: fix:
patch:
content: foo._123abc content: foo._123abc
location: location:
row: 19 row: 19
@ -42,7 +40,6 @@ expression: checks
row: 20 row: 20
column: 22 column: 22
fix: fix:
patch:
content: foo.abc123 content: foo.abc123
location: location:
row: 20 row: 20
@ -58,7 +55,6 @@ expression: checks
row: 21 row: 21
column: 23 column: 23
fix: fix:
patch:
content: foo.abc123 content: foo.abc123
location: location:
row: 21 row: 21
@ -74,7 +70,6 @@ expression: checks
row: 22 row: 22
column: 31 column: 31
fix: fix:
patch:
content: x.bar content: x.bar
location: location:
row: 22 row: 22

View file

@ -10,7 +10,6 @@ expression: checks
row: 33 row: 33
column: 25 column: 25
fix: fix:
patch:
content: foo.bar = None content: foo.bar = None
location: location:
row: 33 row: 33
@ -26,7 +25,6 @@ expression: checks
row: 34 row: 34
column: 29 column: 29
fix: fix:
patch:
content: foo._123abc = None content: foo._123abc = None
location: location:
row: 34 row: 34
@ -42,7 +40,6 @@ expression: checks
row: 35 row: 35
column: 28 column: 28
fix: fix:
patch:
content: foo.abc123 = None content: foo.abc123 = None
location: location:
row: 35 row: 35
@ -58,7 +55,6 @@ expression: checks
row: 36 row: 36
column: 29 column: 29
fix: fix:
patch:
content: foo.abc123 = None content: foo.abc123 = None
location: location:
row: 36 row: 36
@ -74,7 +70,6 @@ expression: checks
row: 37 row: 37
column: 30 column: 30
fix: fix:
patch:
content: foo.bar.baz = None content: foo.bar.baz = None
location: location:
row: 37 row: 37

View file

@ -10,7 +10,6 @@ expression: checks
row: 8 row: 8
column: 12 column: 12
fix: fix:
patch:
content: raise AssertionError() content: raise AssertionError()
location: location:
row: 8 row: 8
@ -26,7 +25,6 @@ expression: checks
row: 10 row: 10
column: 12 column: 12
fix: fix:
patch:
content: "raise AssertionError('message')" content: "raise AssertionError('message')"
location: location:
row: 10 row: 10

View file

@ -11,7 +11,6 @@ expression: checks
row: 3 row: 3
column: 19 column: 19
fix: fix:
patch:
content: ValueError content: ValueError
location: location:
row: 3 row: 3

View file

@ -12,7 +12,6 @@ expression: checks
row: 17 row: 17
column: 24 column: 24
fix: fix:
patch:
content: "OSError," content: "OSError,"
location: location:
row: 17 row: 17
@ -30,7 +29,6 @@ expression: checks
row: 28 row: 28
column: 24 column: 24
fix: fix:
patch:
content: "MyError," content: "MyError,"
location: location:
row: 28 row: 28
@ -48,7 +46,6 @@ expression: checks
row: 49 row: 49
column: 26 column: 26
fix: fix:
patch:
content: "re.error," content: "re.error,"
location: location:
row: 49 row: 49

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 29 column: 29
fix: fix:
patch:
content: "[x for x in range(3)]" content: "[x for x in range(3)]"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 1 column: 1
fix: fix:
patch:
content: "[\n x for x in range(3)\n]" content: "[\n x for x in range(3)\n]"
location: location:
row: 2 row: 2

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 28 column: 28
fix: fix:
patch:
content: "{x for x in range(3)}" content: "{x for x in range(3)}"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 1 column: 1
fix: fix:
patch:
content: "{\n x for x in range(3)\n}" content: "{\n x for x in range(3)\n}"
location: location:
row: 2 row: 2

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 30 column: 30
fix: fix:
patch:
content: "{x: x for x in range(3)}" content: "{x: x for x in range(3)}"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 1 column: 1
fix: fix:
patch:
content: "{\n x: x for x in range(3)\n}" content: "{\n x: x for x in range(3)\n}"
location: location:
row: 2 row: 2

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 30 column: 30
fix: fix:
patch:
content: "{x for x in range(3)}" content: "{x for x in range(3)}"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 1 column: 1
fix: fix:
patch:
content: "{\n x for x in range(3)\n}" content: "{\n x for x in range(3)\n}"
location: location:
row: 2 row: 2

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 32 column: 32
fix: fix:
patch:
content: "{i: i for i in range(3)}" content: "{i: i for i in range(3)}"
location: location:
row: 1 row: 1

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 16 column: 16
fix: fix:
patch:
content: "{1, 2}" content: "{1, 2}"
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 16 column: 16
fix: fix:
patch:
content: "{1, 2}" content: "{1, 2}"
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 12 column: 12
fix: fix:
patch:
content: set() content: set()
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 4 row: 4
column: 12 column: 12
fix: fix:
patch:
content: set() content: set()
location: location:
row: 4 row: 4

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 19 column: 19
fix: fix:
patch:
content: "{1: 2}" content: "{1: 2}"
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 20 column: 20
fix: fix:
patch:
content: "{1: 2,}" content: "{1: 2,}"
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 13 column: 13
fix: fix:
patch:
content: "{}" content: "{}"
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 4 row: 4
column: 13 column: 13
fix: fix:
patch:
content: "{}" content: "{}"
location: location:
row: 4 row: 4

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 11 column: 11
fix: fix:
patch:
content: () content: ()
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 10 column: 10
fix: fix:
patch:
content: "[]" content: "[]"
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 11 column: 11
fix: fix:
patch:
content: "{}" content: "{}"
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 4 row: 4
column: 14 column: 14
fix: fix:
patch:
content: "{\"a\": 1}" content: "{\"a\": 1}"
location: location:
row: 4 row: 4

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 14 column: 14
fix: fix:
patch:
content: () content: ()
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 18 column: 18
fix: fix:
patch:
content: "(1, 2)" content: "(1, 2)"
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 18 column: 18
fix: fix:
patch:
content: "(1, 2)" content: "(1, 2)"
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 7 row: 7
column: 2 column: 2
fix: fix:
patch:
content: "(\n 1,\n 2\n)" content: "(\n 1,\n 2\n)"
location: location:
row: 4 row: 4
@ -79,7 +75,6 @@ expression: checks
row: 10 row: 10
column: 1 column: 1
fix: fix:
patch:
content: "(1, 2)" content: "(1, 2)"
location: location:
row: 8 row: 8

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 17 column: 17
fix: fix:
patch:
content: "[1, 2]" content: "[1, 2]"
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 17 column: 17
fix: fix:
patch:
content: "[1, 2]" content: "[1, 2]"
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 13 column: 13
fix: fix:
patch:
content: "[]" content: "[]"
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 4 row: 4
column: 13 column: 13
fix: fix:
patch:
content: "[]" content: "[]"
location: location:
row: 4 row: 4

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 20 column: 20
fix: fix:
patch:
content: "[i for i in x]" content: "[i for i in x]"
location: location:
row: 2 row: 2

View file

@ -11,7 +11,6 @@ expression: checks
row: 3 row: 3
column: 15 column: 15
fix: fix:
patch:
content: sorted(x) content: sorted(x)
location: location:
row: 3 row: 3
@ -28,7 +27,6 @@ expression: checks
row: 4 row: 4
column: 19 column: 19
fix: fix:
patch:
content: "sorted(x, reverse=True)" content: "sorted(x, reverse=True)"
location: location:
row: 4 row: 4
@ -45,7 +43,6 @@ expression: checks
row: 5 row: 5
column: 36 column: 36
fix: fix:
patch:
content: "sorted(x, key=lambda e: e, reverse=True)" content: "sorted(x, key=lambda e: e, reverse=True)"
location: location:
row: 5 row: 5
@ -62,7 +59,6 @@ expression: checks
row: 6 row: 6
column: 33 column: 33
fix: fix:
patch:
content: "sorted(x, reverse=True)" content: "sorted(x, reverse=True)"
location: location:
row: 6 row: 6

View file

@ -11,7 +11,6 @@ expression: checks
row: 2 row: 2
column: 14 column: 14
fix: fix:
patch:
content: list(x) content: list(x)
location: location:
row: 2 row: 2
@ -28,7 +27,6 @@ expression: checks
row: 3 row: 3
column: 14 column: 14
fix: fix:
patch:
content: set(x) content: set(x)
location: location:
row: 3 row: 3

View file

@ -32,7 +32,7 @@ pub fn print_call(checker: &mut Checker, expr: &Expr, func: &Expr) {
&deleted, &deleted,
) { ) {
Ok(fix) => { Ok(fix) => {
if fix.patch.content.is_empty() || fix.patch.content == "pass" { if fix.content.is_empty() || fix.content == "pass" {
checker.deletions.insert(context.defined_by); checker.deletions.insert(context.defined_by);
} }
check.amend(fix); check.amend(fix);

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 3 row: 3
column: 23 column: 23
fix: fix:
patch:
content: "" content: ""
location: location:
row: 3 row: 3
@ -26,7 +25,6 @@ expression: checks
row: 8 row: 8
column: 30 column: 30
fix: fix:
patch:
content: "" content: ""
location: location:
row: 8 row: 8

View file

@ -10,7 +10,6 @@ expression: checks
row: 8 row: 8
column: 0 column: 0
fix: fix:
patch:
content: "import os\n\n# This is a comment in the same section, so we need to add one newline.\nimport sys\n\nimport numpy as np\n\n# This is a comment, but it starts a new section, so we don't need to add a newline\n# before it.\nimport leading_prefix\n" content: "import os\n\n# This is a comment in the same section, so we need to add one newline.\nimport sys\n\nimport numpy as np\n\n# This is a comment, but it starts a new section, so we don't need to add a newline\n# before it.\nimport leading_prefix\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 6 row: 6
column: 0 column: 0
fix: fix:
patch:
content: "from collections import (\n AsyncIterable,\n Awaitable,\n ChainMap,\n Collection,\n MutableMapping,\n MutableSequence,\n)\n" content: "from collections import (\n AsyncIterable,\n Awaitable,\n ChainMap,\n Collection,\n MutableMapping,\n MutableSequence,\n)\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 26 row: 26
column: 0 column: 0
fix: fix:
patch:
content: "import B # Comment 4\n\n# Comment 3a\n# Comment 3b\nimport C\nimport D\n\n# Comment 5\n# Comment 6\nfrom A import (\n a, # Comment 7 # Comment 9\n b, # Comment 10\n c, # Comment 8 # Comment 11\n)\n" content: "import B # Comment 4\n\n# Comment 3a\n# Comment 3b\nimport C\nimport D\n\n# Comment 5\n# Comment 6\nfrom A import (\n a, # Comment 7 # Comment 9\n b, # Comment 10\n c, # Comment 8 # Comment 11\n)\n"
location: location:
row: 3 row: 3

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 0 column: 0
fix: fix:
patch:
content: "import os\nimport os as os1\nimport os as os2\n" content: "import os\nimport os as os1\nimport os as os2\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 15 row: 15
column: 0 column: 0
fix: fix:
patch:
content: " from line_with_88 import aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n from line_with_89 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_90 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_91 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_92 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_93 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n" content: " from line_with_88 import aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n from line_with_89 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_90 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_91 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_92 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n from line_with_93 import (\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n )\n"
location: location:
row: 7 row: 7

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 0 column: 0
fix: fix:
patch:
content: "import a\n\n# Don't take this comment into account when determining whether the next import can fit on one line.\nfrom b import c\nfrom d import ( # Do take this comment into account when determining whether the next import can fit on one line.\n e,\n)\n" content: "import a\n\n# Don't take this comment into account when determining whether the next import can fit on one line.\nfrom b import c\nfrom d import ( # Do take this comment into account when determining whether the next import can fit on one line.\n e,\n)\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 3 row: 3
column: 0 column: 0
fix: fix:
patch:
content: "import os\nfrom collections import Collection\n" content: "import os\nfrom collections import Collection\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 9 column: 9
fix: fix:
patch:
content: "\nimport os\nimport sys\n" content: "\nimport os\nimport sys\n"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 6 row: 6
column: 13 column: 13
fix: fix:
patch:
content: "\n import os\n import sys\n" content: "\n import os\n import sys\n"
location: location:
row: 5 row: 5

View file

@ -10,7 +10,6 @@ expression: checks
row: 13 row: 13
column: 0 column: 0
fix: fix:
patch:
content: "import glob\nimport os\nimport shutil\nimport tempfile\nimport time\nfrom subprocess import PIPE, STDOUT, Popen\n\nimport BAR\nimport bar\nimport FOO\nimport foo\nimport StringIO\nfrom module import BASIC, CONSTANT, Apple, Class, function\n" content: "import glob\nimport os\nimport shutil\nimport tempfile\nimport time\nfrom subprocess import PIPE, STDOUT, Popen\n\nimport BAR\nimport bar\nimport FOO\nimport foo\nimport StringIO\nfrom module import BASIC, CONSTANT, Apple, Class, function\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 0 column: 0
fix: fix:
patch:
content: "from ..a import a\nfrom ..b import a\nfrom .a import a\nfrom .b import a\n" content: "from ..a import a\nfrom ..b import a\nfrom .a import a\nfrom .b import a\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 12 row: 12
column: 0 column: 0
fix: fix:
patch:
content: "import abc\nimport io\n\n# Old MacDonald had a farm,\n# EIEIO\n# And on his farm he had a cow,\n# EIEIO\n# With a moo-moo here and a moo-moo there\n# Here a moo, there a moo, everywhere moo-moo\n# Old MacDonald had a farm,\n# EIEIO\nfrom errno import EIO\n" content: "import abc\nimport io\n\n# Old MacDonald had a farm,\n# EIEIO\n# And on his farm he had a cow,\n# EIEIO\n# With a moo-moo here and a moo-moo there\n# Here a moo, there a moo, everywhere moo-moo\n# Old MacDonald had a farm,\n# EIEIO\nfrom errno import EIO\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 4 row: 4
column: 0 column: 0
fix: fix:
patch:
content: " import os\n import sys\n" content: " import os\n import sys\n"
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 7 row: 7
column: 0 column: 0
fix: fix:
patch:
content: " import os\n import sys\n" content: " import os\n import sys\n"
location: location:
row: 5 row: 5

View file

@ -10,7 +10,6 @@ expression: checks
row: 3 row: 3
column: 0 column: 0
fix: fix:
patch:
content: "import os\nimport sys\n" content: "import os\nimport sys\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 6 row: 6
column: 0 column: 0
fix: fix:
patch:
content: "import os\nimport sys\n\nimport numpy as np\n\nimport leading_prefix\nfrom leading_prefix import Class\n" content: "import os\nimport sys\n\nimport numpy as np\n\nimport leading_prefix\nfrom leading_prefix import Class\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 4 row: 4
column: 0 column: 0
fix: fix:
patch:
content: "from __future__ import annotations\n\nimport os\nimport sys\n" content: "from __future__ import annotations\n\nimport os\nimport sys\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 0 column: 0
fix: fix:
patch:
content: "import os\nimport sys\n\nimport leading_prefix\n\nfrom . import leading_prefix\n" content: "import os\nimport sys\n\nimport leading_prefix\n\nfrom . import leading_prefix\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 0 column: 0
fix: fix:
patch:
content: "import os\nimport sys\n\nimport numpy as np\nimport pandas as pd\n" content: "import os\nimport sys\n\nimport numpy as np\nimport pandas as pd\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 11 row: 11
column: 0 column: 0
fix: fix:
patch:
content: "import abc\nimport collections\n" content: "import abc\nimport collections\n"
location: location:
row: 9 row: 9

View file

@ -10,7 +10,6 @@ expression: checks
row: 27 row: 27
column: 0 column: 0
fix: fix:
patch:
content: "import A\nimport a\nimport B\nimport b\nimport x\nimport x as A\nimport x as Y\nimport x as a\nimport x as y\nfrom a import BAD as DEF\nfrom a import B, b\nfrom a import B as A\nfrom a import B as Abc\nfrom a import B as DEF\nfrom a import Boo as DEF\nfrom a import b as a\nfrom a import b as c\nfrom a import b as d\nfrom a import b as x\nfrom a import b as y\nfrom b import C, c\nfrom b import c as d\n" content: "import A\nimport a\nimport B\nimport b\nimport x\nimport x as A\nimport x as Y\nimport x as a\nimport x as y\nfrom a import BAD as DEF\nfrom a import B, b\nfrom a import B as A\nfrom a import B as Abc\nfrom a import B as DEF\nfrom a import Boo as DEF\nfrom a import b as a\nfrom a import b as c\nfrom a import b as d\nfrom a import b as x\nfrom a import b as y\nfrom b import C, c\nfrom b import c as d\n"
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 9 column: 9
fix: fix:
patch:
content: "import os\nimport sys\n" content: "import os\nimport sys\n"
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 6 row: 6
column: 13 column: 13
fix: fix:
patch:
content: " import os\n import sys\n" content: " import os\n import sys\n"
location: location:
row: 5 row: 5

View file

@ -11,7 +11,6 @@ expression: checks
row: 2 row: 2
column: 14 column: 14
fix: fix:
patch:
content: res is None content: res is None
location: location:
row: 2 row: 2
@ -28,7 +27,6 @@ expression: checks
row: 5 row: 5
column: 14 column: 14
fix: fix:
patch:
content: res is not None content: res is not None
location: location:
row: 5 row: 5
@ -45,7 +43,6 @@ expression: checks
row: 8 row: 8
column: 7 column: 7
fix: fix:
patch:
content: None is res content: None is res
location: location:
row: 8 row: 8
@ -62,7 +59,6 @@ expression: checks
row: 11 row: 11
column: 7 column: 7
fix: fix:
patch:
content: None is not res content: None is not res
location: location:
row: 11 row: 11
@ -79,7 +75,6 @@ expression: checks
row: 14 row: 14
column: 17 column: 17
fix: fix:
patch:
content: "res[1] is None" content: "res[1] is None"
location: location:
row: 14 row: 14
@ -96,7 +91,6 @@ expression: checks
row: 17 row: 17
column: 17 column: 17
fix: fix:
patch:
content: "res[1] is not None" content: "res[1] is not None"
location: location:
row: 17 row: 17
@ -113,7 +107,6 @@ expression: checks
row: 20 row: 20
column: 7 column: 7
fix: fix:
patch:
content: "None is not res[1]" content: "None is not res[1]"
location: location:
row: 20 row: 20
@ -130,7 +123,6 @@ expression: checks
row: 23 row: 23
column: 7 column: 7
fix: fix:
patch:
content: "None is res[1]" content: "None is res[1]"
location: location:
row: 23 row: 23
@ -147,7 +139,6 @@ expression: checks
row: 26 row: 26
column: 12 column: 12
fix: fix:
patch:
content: "" content: ""
location: location:
row: 26 row: 26
@ -164,7 +155,6 @@ expression: checks
row: 26 row: 26
column: 20 column: 20
fix: fix:
patch:
content: x is None is not None content: x is None is not None
location: location:
row: 26 row: 26

View file

@ -13,7 +13,6 @@ expression: checks
row: 2 row: 2
column: 14 column: 14
fix: fix:
patch:
content: res is True content: res is True
location: location:
row: 2 row: 2
@ -32,7 +31,6 @@ expression: checks
row: 5 row: 5
column: 15 column: 15
fix: fix:
patch:
content: res is not False content: res is not False
location: location:
row: 5 row: 5
@ -51,7 +49,6 @@ expression: checks
row: 8 row: 8
column: 7 column: 7
fix: fix:
patch:
content: True is not res content: True is not res
location: location:
row: 8 row: 8
@ -70,7 +67,6 @@ expression: checks
row: 11 row: 11
column: 8 column: 8
fix: fix:
patch:
content: False is res content: False is res
location: location:
row: 11 row: 11
@ -89,7 +85,6 @@ expression: checks
row: 14 row: 14
column: 17 column: 17
fix: fix:
patch:
content: "res[1] is True" content: "res[1] is True"
location: location:
row: 14 row: 14
@ -108,7 +103,6 @@ expression: checks
row: 17 row: 17
column: 18 column: 18
fix: fix:
patch:
content: "res[1] is not False" content: "res[1] is not False"
location: location:
row: 17 row: 17
@ -127,7 +121,6 @@ expression: checks
row: 20 row: 20
column: 23 column: 23
fix: fix:
patch:
content: cond is True content: cond is True
location: location:
row: 20 row: 20
@ -146,7 +139,6 @@ expression: checks
row: 20 row: 20
column: 48 column: 48
fix: fix:
patch:
content: cond is False content: cond is False
location: location:
row: 20 row: 20
@ -165,7 +157,6 @@ expression: checks
row: 22 row: 22
column: 8 column: 8
fix: fix:
patch:
content: True is TrueElement content: True is TrueElement
location: location:
row: 22 row: 22
@ -184,7 +175,6 @@ expression: checks
row: 25 row: 25
column: 14 column: 14
fix: fix:
patch:
content: "" content: ""
location: location:
row: 25 row: 25
@ -203,7 +193,6 @@ expression: checks
row: 25 row: 25
column: 23 column: 23
fix: fix:
patch:
content: res is True is not False content: res is True is not False
location: location:
row: 25 row: 25

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 13 column: 13
fix: fix:
patch:
content: X not in Y content: X not in Y
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 5 row: 5
column: 15 column: 15
fix: fix:
patch:
content: X.B not in Y content: X.B not in Y
location: location:
row: 5 row: 5
@ -42,7 +40,6 @@ expression: checks
row: 8 row: 8
column: 13 column: 13
fix: fix:
patch:
content: X not in Y content: X not in Y
location: location:
row: 8 row: 8
@ -58,7 +55,6 @@ expression: checks
row: 11 row: 11
column: 28 column: 28
fix: fix:
patch:
content: Y not in Z content: Y not in Z
location: location:
row: 11 row: 11
@ -74,7 +70,6 @@ expression: checks
row: 14 row: 14
column: 14 column: 14
fix: fix:
patch:
content: X not in Y content: X not in Y
location: location:
row: 14 row: 14

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 13 column: 13
fix: fix:
patch:
content: X is not Y content: X is not Y
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 5 row: 5
column: 15 column: 15
fix: fix:
patch:
content: X.B is not Y content: X.B is not Y
location: location:
row: 5 row: 5

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 19 column: 19
fix: fix:
patch:
content: "def f(x):\n return (2 * x)" content: "def f(x):\n return (2 * x)"
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 19 column: 19
fix: fix:
patch:
content: "def f(x):\n return (2 * x)" content: "def f(x):\n return (2 * x)"
location: location:
row: 4 row: 4
@ -42,7 +40,6 @@ expression: checks
row: 7 row: 7
column: 29 column: 29
fix: fix:
patch:
content: "def this(y, z):\n return (2 * x)" content: "def this(y, z):\n return (2 * x)"
location: location:
row: 7 row: 7

View file

@ -11,7 +11,6 @@ expression: checks
row: 137 row: 137
column: 24 column: 24
fix: fix:
patch:
content: "" content: ""
location: location:
row: 136 row: 136
@ -28,7 +27,6 @@ expression: checks
row: 151 row: 151
column: 37 column: 37
fix: fix:
patch:
content: "" content: ""
location: location:
row: 150 row: 150
@ -45,7 +43,6 @@ expression: checks
row: 549 row: 549
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 545 row: 545
@ -62,7 +59,6 @@ expression: checks
row: 571 row: 571
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 567 row: 567

View file

@ -11,7 +11,6 @@ expression: checks
row: 142 row: 142
column: 24 column: 24
fix: fix:
patch:
content: "" content: ""
location: location:
row: 143 row: 143
@ -28,7 +27,6 @@ expression: checks
row: 151 row: 151
column: 37 column: 37
fix: fix:
patch:
content: "" content: ""
location: location:
row: 152 row: 152
@ -45,7 +43,6 @@ expression: checks
row: 558 row: 558
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 559 row: 559
@ -62,7 +59,6 @@ expression: checks
row: 571 row: 571
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 572 row: 572

View file

@ -11,7 +11,6 @@ expression: checks
row: 161 row: 161
column: 32 column: 32
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 161 row: 161
@ -28,7 +27,6 @@ expression: checks
row: 192 row: 192
column: 45 column: 45
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 192 row: 192
@ -45,7 +43,6 @@ expression: checks
row: 532 row: 532
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 526 row: 526

View file

@ -11,7 +11,6 @@ expression: checks
row: 181 row: 181
column: 24 column: 24
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 182 row: 182
@ -28,7 +27,6 @@ expression: checks
row: 192 row: 192
column: 45 column: 45
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 193 row: 193

View file

@ -10,7 +10,6 @@ expression: checks
row: 203 row: 203
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 201 row: 201
@ -26,7 +25,6 @@ expression: checks
row: 215 row: 215
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 211 row: 211

View file

@ -10,7 +10,6 @@ expression: checks
row: 232 row: 232
column: 0 column: 0
fix: fix:
patch:
content: " " content: " "
location: location:
row: 232 row: 232
@ -26,7 +25,6 @@ expression: checks
row: 440 row: 440
column: 0 column: 0
fix: fix:
patch:
content: " " content: " "
location: location:
row: 440 row: 440

View file

@ -10,7 +10,6 @@ expression: checks
row: 252 row: 252
column: 0 column: 0
fix: fix:
patch:
content: " " content: " "
location: location:
row: 252 row: 252
@ -26,7 +25,6 @@ expression: checks
row: 264 row: 264
column: 0 column: 0
fix: fix:
patch:
content: " " content: " "
location: location:
row: 264 row: 264
@ -42,7 +40,6 @@ expression: checks
row: 272 row: 272
column: 0 column: 0
fix: fix:
patch:
content: " " content: " "
location: location:
row: 272 row: 272

View file

@ -10,7 +10,6 @@ expression: checks
row: 283 row: 283
column: 19 column: 19
fix: fix:
patch:
content: "\n " content: "\n "
location: location:
row: 283 row: 283

View file

@ -10,7 +10,6 @@ expression: checks
row: 288 row: 288
column: 33 column: 33
fix: fix:
patch:
content: Whitespace at the end. content: Whitespace at the end.
location: location:
row: 288 row: 288
@ -26,7 +25,6 @@ expression: checks
row: 293 row: 293
column: 37 column: 37
fix: fix:
patch:
content: Whitespace at everywhere. content: Whitespace at everywhere.
location: location:
row: 293 row: 293
@ -42,7 +40,6 @@ expression: checks
row: 302 row: 302
column: 7 column: 7
fix: fix:
patch:
content: Whitespace at the beginning. content: Whitespace at the beginning.
location: location:
row: 299 row: 299

View file

@ -11,7 +11,6 @@ expression: checks
row: 170 row: 170
column: 29 column: 29
fix: fix:
patch:
content: "" content: ""
location: location:
row: 169 row: 169
@ -28,7 +27,6 @@ expression: checks
row: 181 row: 181
column: 24 column: 24
fix: fix:
patch:
content: "" content: ""
location: location:
row: 180 row: 180

View file

@ -11,7 +11,6 @@ expression: checks
row: 141 row: 141
column: 7 column: 7
fix: fix:
patch:
content: " " content: " "
location: location:
row: 137 row: 137

View file

@ -11,7 +11,6 @@ expression: checks
row: 153 row: 153
column: 7 column: 7
fix: fix:
patch:
content: " " content: " "
location: location:
row: 150 row: 150
@ -28,7 +27,6 @@ expression: checks
row: 165 row: 165
column: 7 column: 7
fix: fix:
patch:
content: " " content: " "
location: location:
row: 164 row: 164

View file

@ -11,7 +11,6 @@ expression: checks
row: 23 row: 23
column: 7 column: 7
fix: fix:
patch:
content: Returns content: Returns
location: location:
row: 19 row: 19
@ -28,7 +27,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: Short Summary content: Short Summary
location: location:
row: 209 row: 209

View file

@ -11,7 +11,6 @@ expression: checks
row: 36 row: 36
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 32 row: 32
@ -28,7 +27,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 218 row: 218
@ -45,7 +43,6 @@ expression: checks
row: 262 row: 262
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 257 row: 257
@ -62,7 +59,6 @@ expression: checks
row: 262 row: 262
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 259 row: 259

View file

@ -11,7 +11,6 @@ expression: checks
row: 47 row: 47
column: 7 column: 7
fix: fix:
patch:
content: " -------\n" content: " -------\n"
location: location:
row: 45 row: 45
@ -28,7 +27,6 @@ expression: checks
row: 58 row: 58
column: 7 column: 7
fix: fix:
patch:
content: " -------\n" content: " -------\n"
location: location:
row: 57 row: 57
@ -45,7 +43,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: " ------\n" content: " ------\n"
location: location:
row: 219 row: 219
@ -62,7 +59,6 @@ expression: checks
row: 262 row: 262
column: 7 column: 7
fix: fix:
patch:
content: " -------\n" content: " -------\n"
location: location:
row: 258 row: 258
@ -79,7 +75,6 @@ expression: checks
row: 262 row: 262
column: 7 column: 7
fix: fix:
patch:
content: " ------\n" content: " ------\n"
location: location:
row: 260 row: 260
@ -96,7 +91,6 @@ expression: checks
row: 274 row: 274
column: 7 column: 7
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 272 row: 272
@ -113,7 +107,6 @@ expression: checks
row: 292 row: 292
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 289 row: 289
@ -130,7 +123,6 @@ expression: checks
row: 306 row: 306
column: 7 column: 7
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 304 row: 304
@ -147,7 +139,6 @@ expression: checks
row: 319 row: 319
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 316 row: 316
@ -164,7 +155,6 @@ expression: checks
row: 330 row: 330
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 328 row: 328
@ -181,7 +171,6 @@ expression: checks
row: 343 row: 343
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 340 row: 340
@ -198,7 +187,6 @@ expression: checks
row: 355 row: 355
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 353 row: 353
@ -215,7 +203,6 @@ expression: checks
row: 367 row: 367
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 365 row: 365
@ -232,7 +219,6 @@ expression: checks
row: 382 row: 382
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 374 row: 374
@ -249,7 +235,6 @@ expression: checks
row: 497 row: 497
column: 11 column: 11
fix: fix:
patch:
content: " ----\n" content: " ----\n"
location: location:
row: 495 row: 495

View file

@ -11,7 +11,6 @@ expression: checks
row: 92 row: 92
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 88 row: 88

View file

@ -11,7 +11,6 @@ expression: checks
row: 105 row: 105
column: 7 column: 7
fix: fix:
patch:
content: " -------\n" content: " -------\n"
location: location:
row: 102 row: 102
@ -28,7 +27,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: " -------\n" content: " -------\n"
location: location:
row: 216 row: 216

View file

@ -11,7 +11,6 @@ expression: checks
row: 78 row: 78
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 71 row: 71
@ -28,7 +27,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 218 row: 218

View file

@ -11,7 +11,6 @@ expression: checks
row: 78 row: 78
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 71 row: 71
@ -28,7 +27,6 @@ expression: checks
row: 129 row: 129
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 125 row: 125
@ -45,7 +43,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: "\n" content: "\n"
location: location:
row: 218 row: 218

View file

@ -11,7 +11,6 @@ expression: checks
row: 221 row: 221
column: 7 column: 7
fix: fix:
patch:
content: "" content: ""
location: location:
row: 211 row: 211

View file

@ -13,7 +13,6 @@ expression: checks
row: 2 row: 2
column: 16 column: 16
fix: fix:
patch:
content: import os content: import os
location: location:
row: 2 row: 2
@ -32,7 +31,6 @@ expression: checks
row: 6 row: 6
column: 15 column: 15
fix: fix:
patch:
content: "from collections import (\n Counter,\n namedtuple,\n)" content: "from collections import (\n Counter,\n namedtuple,\n)"
location: location:
row: 4 row: 4
@ -51,7 +49,6 @@ expression: checks
row: 12 row: 12
column: 23 column: 23
fix: fix:
patch:
content: "" content: ""
location: location:
row: 12 row: 12
@ -70,7 +67,6 @@ expression: checks
row: 32 row: 32
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 32 row: 32
@ -89,7 +85,6 @@ expression: checks
row: 33 row: 33
column: 20 column: 20
fix: fix:
patch:
content: pass content: pass
location: location:
row: 33 row: 33
@ -108,7 +103,6 @@ expression: checks
row: 37 row: 37
column: 18 column: 18
fix: fix:
patch:
content: "" content: ""
location: location:
row: 37 row: 37
@ -127,7 +121,6 @@ expression: checks
row: 52 row: 52
column: 21 column: 21
fix: fix:
patch:
content: pass content: pass
location: location:
row: 52 row: 52

View file

@ -13,7 +13,6 @@ expression: checks
row: 2 row: 2
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 2 row: 2
@ -32,7 +31,6 @@ expression: checks
row: 3 row: 3
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 3 row: 3
@ -51,7 +49,6 @@ expression: checks
row: 4 row: 4
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 4 row: 4
@ -70,7 +67,6 @@ expression: checks
row: 5 row: 5
column: 15 column: 15
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5

View file

@ -13,7 +13,6 @@ expression: checks
row: 7 row: 7
column: 39 column: 39
fix: fix:
patch:
content: "" content: ""
location: location:
row: 7 row: 7
@ -32,7 +31,6 @@ expression: checks
row: 10 row: 10
column: 52 column: 52
fix: fix:
patch:
content: "" content: ""
location: location:
row: 10 row: 10
@ -51,7 +49,6 @@ expression: checks
row: 17 row: 17
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 17 row: 17
@ -70,7 +67,6 @@ expression: checks
row: 20 row: 20
column: 35 column: 35
fix: fix:
patch:
content: "" content: ""
location: location:
row: 20 row: 20

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 13 column: 13
fix: fix:
patch:
content: "x == \"abc\"" content: "x == \"abc\""
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 4 row: 4
column: 15 column: 15
fix: fix:
patch:
content: 123 != y content: 123 != y
location: location:
row: 4 row: 4
@ -42,7 +40,6 @@ expression: checks
row: 7 row: 7
column: 17 column: 17
fix: fix:
patch:
content: "\"123\" == x" content: "\"123\" == x"
location: location:
row: 7 row: 7

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 24 column: 24
fix: fix:
patch:
content: NotImplementedError content: NotImplementedError
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 6 row: 6
column: 24 column: 24
fix: fix:
patch:
content: NotImplementedError content: NotImplementedError
location: location:
row: 6 row: 6

View file

@ -13,7 +13,6 @@ expression: checks
row: 8 row: 8
column: 7 column: 7
fix: fix:
patch:
content: "from models import (\n Fruit,\n)" content: "from models import (\n Fruit,\n)"
location: location:
row: 6 row: 6

View file

@ -71,7 +71,7 @@ pub fn unnecessary_future_import(checker: &mut Checker, stmt: &Stmt, names: &[Lo
&deleted, &deleted,
) { ) {
Ok(fix) => { Ok(fix) => {
if fix.patch.content.is_empty() || fix.patch.content == "pass" { if fix.content.is_empty() || fix.content == "pass" {
checker.deletions.insert(context.defined_by); checker.deletions.insert(context.defined_by);
} }
check.amend(fix); check.amend(fix);

View file

@ -25,7 +25,7 @@ pub fn useless_metaclass_type(checker: &mut Checker, stmt: &Stmt, value: &Expr,
&deleted, &deleted,
) { ) {
Ok(fix) => { Ok(fix) => {
if fix.patch.content.is_empty() || fix.patch.content == "pass" { if fix.content.is_empty() || fix.content == "pass" {
checker.deletions.insert(context.defined_by); checker.deletions.insert(context.defined_by);
} }
check.amend(fix); check.amend(fix);

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 24 column: 24
fix: fix:
patch:
content: pass content: pass
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 6 row: 6
column: 24 column: 24
fix: fix:
patch:
content: "" content: ""
location: location:
row: 6 row: 6

View file

@ -11,7 +11,6 @@ expression: checks
row: 1 row: 1
column: 8 column: 8
fix: fix:
patch:
content: str content: str
location: location:
row: 1 row: 1
@ -28,7 +27,6 @@ expression: checks
row: 2 row: 2
column: 9 column: 9
fix: fix:
patch:
content: bytes content: bytes
location: location:
row: 2 row: 2
@ -45,7 +43,6 @@ expression: checks
row: 3 row: 3
column: 7 column: 7
fix: fix:
patch:
content: int content: int
location: location:
row: 3 row: 3
@ -62,7 +59,6 @@ expression: checks
row: 4 row: 4
column: 8 column: 8
fix: fix:
patch:
content: float content: float
location: location:
row: 4 row: 4
@ -79,7 +75,6 @@ expression: checks
row: 5 row: 5
column: 8 column: 8
fix: fix:
patch:
content: complex content: complex
location: location:
row: 5 row: 5

View file

@ -11,7 +11,6 @@ expression: checks
row: 5 row: 5
column: 14 column: 14
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5
@ -28,7 +27,6 @@ expression: checks
row: 10 row: 10
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 9 row: 9
@ -45,7 +43,6 @@ expression: checks
row: 16 row: 16
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 15 row: 15
@ -62,7 +59,6 @@ expression: checks
row: 24 row: 24
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 22 row: 22
@ -79,7 +75,6 @@ expression: checks
row: 31 row: 31
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 29 row: 29
@ -96,7 +91,6 @@ expression: checks
row: 37 row: 37
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 36 row: 36
@ -113,7 +107,6 @@ expression: checks
row: 45 row: 45
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 43 row: 43
@ -130,7 +123,6 @@ expression: checks
row: 53 row: 53
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 51 row: 51
@ -147,7 +139,6 @@ expression: checks
row: 61 row: 61
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 59 row: 59
@ -164,7 +155,6 @@ expression: checks
row: 69 row: 69
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 67 row: 67
@ -181,7 +171,6 @@ expression: checks
row: 75 row: 75
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 75 row: 75
@ -198,7 +187,6 @@ expression: checks
row: 79 row: 79
column: 14 column: 14
fix: fix:
patch:
content: "" content: ""
location: location:
row: 79 row: 79
@ -215,7 +203,6 @@ expression: checks
row: 84 row: 84
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 84 row: 84
@ -232,7 +219,6 @@ expression: checks
row: 92 row: 92
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 91 row: 91
@ -249,7 +235,6 @@ expression: checks
row: 98 row: 98
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 98 row: 98
@ -266,7 +251,6 @@ expression: checks
row: 108 row: 108
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 107 row: 107
@ -283,7 +267,6 @@ expression: checks
row: 114 row: 114
column: 18 column: 18
fix: fix:
patch:
content: "" content: ""
location: location:
row: 114 row: 114
@ -300,7 +283,6 @@ expression: checks
row: 119 row: 119
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 118 row: 118
@ -317,7 +299,6 @@ expression: checks
row: 125 row: 125
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 124 row: 124
@ -334,7 +315,6 @@ expression: checks
row: 131 row: 131
column: 10 column: 10
fix: fix:
patch:
content: "" content: ""
location: location:
row: 130 row: 130

View file

@ -13,7 +13,6 @@ expression: checks
row: 6 row: 6
column: 25 column: 25
fix: fix:
patch:
content: self.assertEqual content: self.assertEqual
location: location:
row: 6 row: 6
@ -32,7 +31,6 @@ expression: checks
row: 7 row: 7
column: 25 column: 25
fix: fix:
patch:
content: self.assertEqual content: self.assertEqual
location: location:
row: 7 row: 7
@ -51,7 +49,6 @@ expression: checks
row: 9 row: 9
column: 34 column: 34
fix: fix:
patch:
content: self.assertAlmostEqual content: self.assertAlmostEqual
location: location:
row: 9 row: 9
@ -70,7 +67,6 @@ expression: checks
row: 10 row: 10
column: 35 column: 35
fix: fix:
patch:
content: self.assertNotRegex content: self.assertNotRegex
location: location:
row: 10 row: 10

View file

@ -11,7 +11,6 @@ expression: checks
row: 4 row: 4
column: 20 column: 20
fix: fix:
patch:
content: list content: list
location: location:
row: 4 row: 4
@ -28,7 +27,6 @@ expression: checks
row: 11 row: 11
column: 13 column: 13
fix: fix:
patch:
content: list content: list
location: location:
row: 11 row: 11
@ -45,7 +43,6 @@ expression: checks
row: 18 row: 18
column: 15 column: 15
fix: fix:
patch:
content: list content: list
location: location:
row: 18 row: 18
@ -62,7 +59,6 @@ expression: checks
row: 25 row: 25
column: 14 column: 14
fix: fix:
patch:
content: list content: list
location: location:
row: 25 row: 25

View file

@ -10,7 +10,6 @@ expression: checks
row: 6 row: 6
column: 22 column: 22
fix: fix:
patch:
content: str | None content: str | None
location: location:
row: 6 row: 6
@ -26,7 +25,6 @@ expression: checks
row: 10 row: 10
column: 29 column: 29
fix: fix:
patch:
content: str | None content: str | None
location: location:
row: 10 row: 10
@ -42,7 +40,6 @@ expression: checks
row: 14 row: 14
column: 45 column: 45
fix: fix:
patch:
content: "str | int | Union[float, bytes]" content: "str | int | Union[float, bytes]"
location: location:
row: 14 row: 14
@ -58,7 +55,6 @@ expression: checks
row: 14 row: 14
column: 44 column: 44
fix: fix:
patch:
content: float | bytes content: float | bytes
location: location:
row: 14 row: 14
@ -74,7 +70,6 @@ expression: checks
row: 18 row: 18
column: 31 column: 31
fix: fix:
patch:
content: str | int content: str | int
location: location:
row: 18 row: 18
@ -90,7 +85,6 @@ expression: checks
row: 22 row: 22
column: 33 column: 33
fix: fix:
patch:
content: str | int content: str | int
location: location:
row: 22 row: 22
@ -106,7 +100,6 @@ expression: checks
row: 26 row: 26
column: 40 column: 40
fix: fix:
patch:
content: "(str, int) | float" content: "(str, int) | float"
location: location:
row: 26 row: 26

View file

@ -10,7 +10,6 @@ expression: checks
row: 17 row: 17
column: 35 column: 35
fix: fix:
patch:
content: super() content: super()
location: location:
row: 17 row: 17
@ -26,7 +25,6 @@ expression: checks
row: 18 row: 18
column: 26 column: 26
fix: fix:
patch:
content: super() content: super()
location: location:
row: 18 row: 18
@ -42,7 +40,6 @@ expression: checks
row: 22 row: 22
column: 9 column: 9
fix: fix:
patch:
content: super() content: super()
location: location:
row: 19 row: 19
@ -58,7 +55,6 @@ expression: checks
row: 36 row: 36
column: 28 column: 28
fix: fix:
patch:
content: super() content: super()
location: location:
row: 36 row: 36
@ -74,7 +70,6 @@ expression: checks
row: 50 row: 50
column: 32 column: 32
fix: fix:
patch:
content: super() content: super()
location: location:
row: 50 row: 50

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 0 column: 0
fix: fix:
patch:
content: "" content: ""
location: location:
row: 1 row: 1

View file

@ -10,7 +10,6 @@ expression: checks
row: 3 row: 3
column: 0 column: 0
fix: fix:
patch:
content: "" content: ""
location: location:
row: 2 row: 2

View file

@ -13,7 +13,6 @@ expression: checks
row: 1 row: 1
column: 48 column: 48
fix: fix:
patch:
content: "" content: ""
location: location:
row: 1 row: 1
@ -32,7 +31,6 @@ expression: checks
row: 2 row: 2
column: 55 column: 55
fix: fix:
patch:
content: "" content: ""
location: location:
row: 2 row: 2
@ -51,7 +49,6 @@ expression: checks
row: 3 row: 3
column: 48 column: 48
fix: fix:
patch:
content: "" content: ""
location: location:
row: 3 row: 3
@ -69,7 +66,6 @@ expression: checks
row: 4 row: 4
column: 37 column: 37
fix: fix:
patch:
content: "" content: ""
location: location:
row: 4 row: 4
@ -88,7 +84,6 @@ expression: checks
row: 5 row: 5
column: 53 column: 53
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5
@ -106,7 +101,6 @@ expression: checks
row: 6 row: 6
column: 49 column: 49
fix: fix:
patch:
content: from __future__ import invalid_module content: from __future__ import invalid_module
location: location:
row: 6 row: 6
@ -124,7 +118,6 @@ expression: checks
row: 9 row: 9
column: 41 column: 41
fix: fix:
patch:
content: "" content: ""
location: location:
row: 9 row: 9
@ -142,7 +135,6 @@ expression: checks
row: 10 row: 10
column: 37 column: 37
fix: fix:
patch:
content: pass content: pass
location: location:
row: 10 row: 10
@ -160,7 +152,6 @@ expression: checks
row: 13 row: 13
column: 41 column: 41
fix: fix:
patch:
content: "" content: ""
location: location:
row: 13 row: 13
@ -178,7 +169,6 @@ expression: checks
row: 14 row: 14
column: 53 column: 53
fix: fix:
patch:
content: from __future__ import invalid_module content: from __future__ import invalid_module
location: location:
row: 14 row: 14

View file

@ -10,7 +10,6 @@ expression: checks
row: 5 row: 5
column: 12 column: 12
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5
@ -26,7 +25,6 @@ expression: checks
row: 11 row: 11
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 11 row: 11
@ -42,7 +40,6 @@ expression: checks
row: 16 row: 16
column: 24 column: 24
fix: fix:
patch:
content: "" content: ""
location: location:
row: 16 row: 16
@ -58,7 +55,6 @@ expression: checks
row: 21 row: 21
column: 34 column: 34
fix: fix:
patch:
content: "" content: ""
location: location:
row: 21 row: 21
@ -74,7 +70,6 @@ expression: checks
row: 28 row: 28
column: 1 column: 1
fix: fix:
patch:
content: "" content: ""
location: location:
row: 27 row: 27
@ -90,7 +85,6 @@ expression: checks
row: 35 row: 35
column: 1 column: 1
fix: fix:
patch:
content: "" content: ""
location: location:
row: 33 row: 33
@ -106,7 +100,6 @@ expression: checks
row: 42 row: 42
column: 19 column: 19
fix: fix:
patch:
content: "" content: ""
location: location:
row: 40 row: 40
@ -122,7 +115,6 @@ expression: checks
row: 51 row: 51
column: 1 column: 1
fix: fix:
patch:
content: "" content: ""
location: location:
row: 47 row: 47
@ -138,7 +130,6 @@ expression: checks
row: 62 row: 62
column: 1 column: 1
fix: fix:
patch:
content: "" content: ""
location: location:
row: 56 row: 56
@ -154,7 +145,6 @@ expression: checks
row: 72 row: 72
column: 1 column: 1
fix: fix:
patch:
content: "" content: ""
location: location:
row: 67 row: 67

View file

@ -10,7 +10,6 @@ expression: checks
row: 2 row: 2
column: 21 column: 21
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 2 row: 2
@ -26,7 +25,6 @@ expression: checks
row: 3 row: 3
column: 18 column: 18
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 3 row: 3
@ -42,7 +40,6 @@ expression: checks
row: 4 row: 4
column: 14 column: 14
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 4 row: 4
@ -58,7 +55,6 @@ expression: checks
row: 5 row: 5
column: 20 column: 20
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 5 row: 5
@ -74,7 +70,6 @@ expression: checks
row: 6 row: 6
column: 22 column: 22
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 6 row: 6
@ -90,7 +85,6 @@ expression: checks
row: 7 row: 7
column: 30 column: 30
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 7 row: 7
@ -106,7 +100,6 @@ expression: checks
row: 14 row: 14
column: 1 column: 1
fix: fix:
patch:
content: "b\"\"\"\nLorem\n\nIpsum\n\"\"\"" content: "b\"\"\"\nLorem\n\nIpsum\n\"\"\""
location: location:
row: 8 row: 8
@ -122,7 +115,6 @@ expression: checks
row: 26 row: 26
column: 27 column: 27
fix: fix:
patch:
content: "" content: ""
location: location:
row: 26 row: 26
@ -138,7 +130,6 @@ expression: checks
row: 44 row: 44
column: 31 column: 31
fix: fix:
patch:
content: "" content: ""
location: location:
row: 44 row: 44
@ -154,7 +145,6 @@ expression: checks
row: 46 row: 46
column: 39 column: 39
fix: fix:
patch:
content: "" content: ""
location: location:
row: 46 row: 46
@ -170,7 +160,6 @@ expression: checks
row: 48 row: 48
column: 23 column: 23
fix: fix:
patch:
content: "br\"fo\\o\"" content: "br\"fo\\o\""
location: location:
row: 48 row: 48
@ -186,7 +175,6 @@ expression: checks
row: 49 row: 49
column: 22 column: 22
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 49 row: 49
@ -202,7 +190,6 @@ expression: checks
row: 50 row: 50
column: 23 column: 23
fix: fix:
patch:
content: "bR\"fo\\o\"" content: "bR\"fo\\o\""
location: location:
row: 50 row: 50
@ -218,7 +205,6 @@ expression: checks
row: 51 row: 51
column: 22 column: 22
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 51 row: 51
@ -234,7 +220,6 @@ expression: checks
row: 52 row: 52
column: 20 column: 20
fix: fix:
patch:
content: "b\"foo\"" content: "b\"foo\""
location: location:
row: 52 row: 52

View file

@ -11,7 +11,6 @@ expression: checks
row: 5 row: 5
column: 52 column: 52
fix: fix:
patch:
content: "class MyType1(TypedDict):\n a: int\n b: str" content: "class MyType1(TypedDict):\n a: int\n b: str"
location: location:
row: 5 row: 5
@ -28,7 +27,6 @@ expression: checks
row: 8 row: 8
column: 50 column: 50
fix: fix:
patch:
content: "class MyType2(TypedDict):\n a: int\n b: str" content: "class MyType2(TypedDict):\n a: int\n b: str"
location: location:
row: 8 row: 8
@ -45,7 +43,6 @@ expression: checks
row: 11 row: 11
column: 44 column: 44
fix: fix:
patch:
content: "class MyType3(TypedDict):\n a: int\n b: str" content: "class MyType3(TypedDict):\n a: int\n b: str"
location: location:
row: 11 row: 11
@ -62,7 +59,6 @@ expression: checks
row: 14 row: 14
column: 30 column: 30
fix: fix:
patch:
content: "class MyType4(TypedDict):\n pass" content: "class MyType4(TypedDict):\n pass"
location: location:
row: 14 row: 14
@ -79,7 +75,6 @@ expression: checks
row: 17 row: 17
column: 46 column: 46
fix: fix:
patch:
content: "class MyType5(TypedDict):\n a: 'hello'" content: "class MyType5(TypedDict):\n a: 'hello'"
location: location:
row: 17 row: 17
@ -96,7 +91,6 @@ expression: checks
row: 18 row: 18
column: 41 column: 41
fix: fix:
patch:
content: "class MyType6(TypedDict):\n a: 'hello'" content: "class MyType6(TypedDict):\n a: 'hello'"
location: location:
row: 18 row: 18
@ -113,7 +107,6 @@ expression: checks
row: 21 row: 21
column: 56 column: 56
fix: fix:
patch:
content: "class MyType7(TypedDict):\n a: NotRequired[dict]" content: "class MyType7(TypedDict):\n a: NotRequired[dict]"
location: location:
row: 21 row: 21
@ -130,7 +123,6 @@ expression: checks
row: 24 row: 24
column: 65 column: 65
fix: fix:
patch:
content: "class MyType8(TypedDict, total=False):\n x: int\n y: int" content: "class MyType8(TypedDict, total=False):\n x: int\n y: int"
location: location:
row: 24 row: 24
@ -147,7 +139,6 @@ expression: checks
row: 30 row: 30
column: 59 column: 59
fix: fix:
patch:
content: "class MyType10(TypedDict):\n key: Literal['value']" content: "class MyType10(TypedDict):\n key: Literal['value']"
location: location:
row: 30 row: 30
@ -164,7 +155,6 @@ expression: checks
row: 33 row: 33
column: 53 column: 53
fix: fix:
patch:
content: "class MyType11(typing.TypedDict):\n key: int" content: "class MyType11(typing.TypedDict):\n key: int"
location: location:
row: 33 row: 33

View file

@ -11,7 +11,6 @@ expression: checks
row: 5 row: 5
column: 61 column: 61
fix: fix:
patch:
content: "class NT1(NamedTuple):\n a: int\n b: tuple[str, ...]" content: "class NT1(NamedTuple):\n a: int\n b: tuple[str, ...]"
location: location:
row: 5 row: 5
@ -28,7 +27,6 @@ expression: checks
row: 12 row: 12
column: 1 column: 1
fix: fix:
patch:
content: "class NT2(NamedTuple):\n a: int\n b: str = 'foo'\n c: list[bool] = [True]" content: "class NT2(NamedTuple):\n a: int\n b: str = 'foo'\n c: list[bool] = [True]"
location: location:
row: 8 row: 8
@ -45,7 +43,6 @@ expression: checks
row: 15 row: 15
column: 56 column: 56
fix: fix:
patch:
content: "class NT3(typing.NamedTuple):\n a: int\n b: str" content: "class NT3(typing.NamedTuple):\n a: int\n b: str"
location: location:
row: 15 row: 15

View file

@ -10,7 +10,6 @@ expression: checks
row: 1 row: 1
column: 16 column: 16
fix: fix:
patch:
content: "" content: ""
location: location:
row: 1 row: 1
@ -26,7 +25,6 @@ expression: checks
row: 2 row: 2
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 2 row: 2
@ -42,7 +40,6 @@ expression: checks
row: 3 row: 3
column: 17 column: 17
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 3 row: 3
@ -58,7 +55,6 @@ expression: checks
row: 4 row: 4
column: 18 column: 18
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 4 row: 4
@ -74,7 +70,6 @@ expression: checks
row: 5 row: 5
column: 16 column: 16
fix: fix:
patch:
content: "" content: ""
location: location:
row: 5 row: 5
@ -90,7 +85,6 @@ expression: checks
row: 6 row: 6
column: 17 column: 17
fix: fix:
patch:
content: "" content: ""
location: location:
row: 6 row: 6
@ -106,7 +100,6 @@ expression: checks
row: 7 row: 7
column: 32 column: 32
fix: fix:
patch:
content: "" content: ""
location: location:
row: 7 row: 7
@ -122,7 +115,6 @@ expression: checks
row: 8 row: 8
column: 15 column: 15
fix: fix:
patch:
content: "\"w\"" content: "\"w\""
location: location:
row: 8 row: 8
@ -138,7 +130,6 @@ expression: checks
row: 10 row: 10
column: 21 column: 21
fix: fix:
patch:
content: "" content: ""
location: location:
row: 10 row: 10
@ -154,7 +145,6 @@ expression: checks
row: 12 row: 12
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 12 row: 12
@ -170,7 +160,6 @@ expression: checks
row: 14 row: 14
column: 22 column: 22
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 14 row: 14
@ -186,7 +175,6 @@ expression: checks
row: 16 row: 16
column: 23 column: 23
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 16 row: 16
@ -202,7 +190,6 @@ expression: checks
row: 18 row: 18
column: 21 column: 21
fix: fix:
patch:
content: "" content: ""
location: location:
row: 18 row: 18
@ -218,7 +205,6 @@ expression: checks
row: 20 row: 20
column: 22 column: 22
fix: fix:
patch:
content: "" content: ""
location: location:
row: 20 row: 20
@ -234,7 +220,6 @@ expression: checks
row: 22 row: 22
column: 39 column: 39
fix: fix:
patch:
content: "" content: ""
location: location:
row: 22 row: 22
@ -250,7 +235,6 @@ expression: checks
row: 24 row: 24
column: 22 column: 22
fix: fix:
patch:
content: "\"w\"" content: "\"w\""
location: location:
row: 24 row: 24
@ -266,7 +250,6 @@ expression: checks
row: 27 row: 27
column: 27 column: 27
fix: fix:
patch:
content: "" content: ""
location: location:
row: 27 row: 27
@ -282,7 +265,6 @@ expression: checks
row: 28 row: 28
column: 28 column: 28
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 28 row: 28
@ -298,7 +280,6 @@ expression: checks
row: 30 row: 30
column: 32 column: 32
fix: fix:
patch:
content: "" content: ""
location: location:
row: 30 row: 30
@ -314,7 +295,6 @@ expression: checks
row: 32 row: 32
column: 33 column: 33
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 32 row: 32
@ -330,7 +310,6 @@ expression: checks
row: 35 row: 35
column: 21 column: 21
fix: fix:
patch:
content: "" content: ""
location: location:
row: 35 row: 35
@ -346,7 +325,6 @@ expression: checks
row: 35 row: 35
column: 45 column: 45
fix: fix:
patch:
content: "" content: ""
location: location:
row: 35 row: 35
@ -362,7 +340,6 @@ expression: checks
row: 37 row: 37
column: 22 column: 22
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 37 row: 37
@ -378,7 +355,6 @@ expression: checks
row: 37 row: 37
column: 47 column: 47
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 37 row: 37
@ -394,7 +370,6 @@ expression: checks
row: 40 row: 40
column: 21 column: 21
fix: fix:
patch:
content: "" content: ""
location: location:
row: 40 row: 40
@ -410,7 +385,6 @@ expression: checks
row: 41 row: 41
column: 26 column: 26
fix: fix:
patch:
content: "" content: ""
location: location:
row: 41 row: 41
@ -426,7 +400,6 @@ expression: checks
row: 42 row: 42
column: 26 column: 26
fix: fix:
patch:
content: "" content: ""
location: location:
row: 42 row: 42
@ -442,7 +415,6 @@ expression: checks
row: 44 row: 44
column: 26 column: 26
fix: fix:
patch:
content: "" content: ""
location: location:
row: 44 row: 44
@ -458,7 +430,6 @@ expression: checks
row: 46 row: 46
column: 31 column: 31
fix: fix:
patch:
content: "" content: ""
location: location:
row: 46 row: 46
@ -474,7 +445,6 @@ expression: checks
row: 48 row: 48
column: 31 column: 31
fix: fix:
patch:
content: "" content: ""
location: location:
row: 48 row: 48
@ -490,7 +460,6 @@ expression: checks
row: 51 row: 51
column: 22 column: 22
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 51 row: 51
@ -506,7 +475,6 @@ expression: checks
row: 52 row: 52
column: 27 column: 27
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 52 row: 52
@ -522,7 +490,6 @@ expression: checks
row: 53 row: 53
column: 27 column: 27
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 53 row: 53
@ -538,7 +505,6 @@ expression: checks
row: 55 row: 55
column: 27 column: 27
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 55 row: 55
@ -554,7 +520,6 @@ expression: checks
row: 57 row: 57
column: 32 column: 32
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 57 row: 57
@ -570,7 +535,6 @@ expression: checks
row: 59 row: 59
column: 32 column: 32
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 59 row: 59
@ -586,7 +550,6 @@ expression: checks
row: 62 row: 62
column: 110 column: 110
fix: fix:
patch:
content: "" content: ""
location: location:
row: 62 row: 62
@ -602,7 +565,6 @@ expression: checks
row: 63 row: 63
column: 110 column: 110
fix: fix:
patch:
content: "" content: ""
location: location:
row: 63 row: 63
@ -618,7 +580,6 @@ expression: checks
row: 64 row: 64
column: 110 column: 110
fix: fix:
patch:
content: "" content: ""
location: location:
row: 64 row: 64
@ -634,7 +595,6 @@ expression: checks
row: 65 row: 65
column: 110 column: 110
fix: fix:
patch:
content: "" content: ""
location: location:
row: 65 row: 65
@ -650,7 +610,6 @@ expression: checks
row: 67 row: 67
column: 111 column: 111
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 67 row: 67
@ -666,7 +625,6 @@ expression: checks
row: 68 row: 68
column: 111 column: 111
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 68 row: 68
@ -682,7 +640,6 @@ expression: checks
row: 69 row: 69
column: 111 column: 111
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 69 row: 69
@ -698,7 +655,6 @@ expression: checks
row: 70 row: 70
column: 111 column: 111
fix: fix:
patch:
content: "\"rb\"" content: "\"rb\""
location: location:
row: 70 row: 70

View file

@ -11,7 +11,6 @@ expression: checks
row: 34 row: 34
column: 21 column: 21
fix: fix:
patch:
content: list content: list
location: location:
row: 34 row: 34

View file

@ -11,7 +11,6 @@ expression: checks
row: 34 row: 34
column: 21 column: 21
fix: fix:
patch:
content: list content: list
location: location:
row: 34 row: 34
@ -28,7 +27,6 @@ expression: checks
row: 35 row: 35
column: 12 column: 12
fix: fix:
patch:
content: list content: list
location: location:
row: 35 row: 35

View file

@ -10,7 +10,6 @@ expression: checks
row: 40 row: 40
column: 16 column: 16
fix: fix:
patch:
content: int | None content: int | None
location: location:
row: 40 row: 40

View file

@ -10,7 +10,6 @@ expression: checks
row: 40 row: 40
column: 16 column: 16
fix: fix:
patch:
content: int | None content: int | None
location: location:
row: 40 row: 40

View file

@ -13,7 +13,6 @@ expression: checks
row: 1 row: 1
column: 6 column: 6
fix: fix:
patch:
content: B content: B
location: location:
row: 1 row: 1

View file

@ -13,7 +13,6 @@ expression: checks
row: 5 row: 5
column: 56 column: 56
fix: fix:
patch:
content: ) content: )
location: location:
row: 5 row: 5

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