mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-24 11:02:45 +00:00
Remove Patch abstraction from Fix (#987)
This commit is contained in:
parent
2e89cd8802
commit
af40e64d6c
105 changed files with 2594 additions and 2983 deletions
|
@ -6,7 +6,7 @@ use ropey::RopeBuilder;
|
|||
use rustpython_parser::ast::Location;
|
||||
|
||||
use crate::ast::types::Range;
|
||||
use crate::autofix::{Fix, Patch};
|
||||
use crate::autofix::Fix;
|
||||
use crate::checks::Check;
|
||||
use crate::source_code_locator::SourceCodeLocator;
|
||||
|
||||
|
@ -58,36 +58,36 @@ fn apply_fixes<'a>(
|
|||
) -> (Cow<'a, str>, usize) {
|
||||
let mut output = RopeBuilder::new();
|
||||
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;
|
||||
|
||||
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
|
||||
// any re-application.
|
||||
if applied.contains(&fix.patch) {
|
||||
if applied.contains(&fix) {
|
||||
num_fixed += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Best-effort approach: if this fix overlaps with a fix we've already applied,
|
||||
// skip it.
|
||||
if last_pos > fix.patch.location {
|
||||
if last_pos > fix.location {
|
||||
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 {
|
||||
location: last_pos,
|
||||
end_location: fix.patch.location,
|
||||
end_location: fix.location,
|
||||
});
|
||||
output.append(&slice);
|
||||
|
||||
// Add the patch itself.
|
||||
output.append(&fix.patch.content);
|
||||
output.append(&fix.content);
|
||||
|
||||
// Track that the fix was applied.
|
||||
last_pos = fix.patch.end_location;
|
||||
applied.insert(&fix.patch);
|
||||
last_pos = fix.end_location;
|
||||
applied.insert(fix);
|
||||
num_fixed += 1;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ mod tests {
|
|||
use rustpython_parser::ast::Location;
|
||||
|
||||
use crate::autofix::fixer::apply_fixes;
|
||||
use crate::autofix::{Fix, Patch};
|
||||
use crate::autofix::Fix;
|
||||
use crate::SourceCodeLocator;
|
||||
|
||||
#[test]
|
||||
|
@ -118,11 +118,9 @@ mod tests {
|
|||
#[test]
|
||||
fn apply_single_replacement() {
|
||||
let fixes = vec![Fix {
|
||||
patch: Patch {
|
||||
content: "Bar".to_string(),
|
||||
location: Location::new(1, 8),
|
||||
end_location: Location::new(1, 14),
|
||||
},
|
||||
content: "Bar".to_string(),
|
||||
location: Location::new(1, 8),
|
||||
end_location: Location::new(1, 14),
|
||||
}];
|
||||
let locator = SourceCodeLocator::new(
|
||||
r#"
|
||||
|
@ -146,11 +144,9 @@ class A(Bar):
|
|||
#[test]
|
||||
fn apply_single_removal() {
|
||||
let fixes = vec![Fix {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 15),
|
||||
},
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 15),
|
||||
}];
|
||||
let locator = SourceCodeLocator::new(
|
||||
r#"
|
||||
|
@ -175,18 +171,14 @@ class A:
|
|||
fn apply_double_removal() {
|
||||
let fixes = vec![
|
||||
Fix {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 16),
|
||||
},
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 16),
|
||||
},
|
||||
Fix {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location: Location::new(1, 16),
|
||||
end_location: Location::new(1, 23),
|
||||
},
|
||||
content: String::new(),
|
||||
location: Location::new(1, 16),
|
||||
end_location: Location::new(1, 23),
|
||||
},
|
||||
];
|
||||
let locator = SourceCodeLocator::new(
|
||||
|
@ -213,18 +205,14 @@ class A:
|
|||
fn ignore_overlapping_fixes() {
|
||||
let fixes = vec![
|
||||
Fix {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 15),
|
||||
},
|
||||
content: String::new(),
|
||||
location: Location::new(1, 7),
|
||||
end_location: Location::new(1, 15),
|
||||
},
|
||||
Fix {
|
||||
patch: Patch {
|
||||
content: "ignored".to_string(),
|
||||
location: Location::new(1, 9),
|
||||
end_location: Location::new(1, 11),
|
||||
},
|
||||
content: "ignored".to_string(),
|
||||
location: Location::new(1, 9),
|
||||
end_location: Location::new(1, 11),
|
||||
},
|
||||
];
|
||||
let locator = SourceCodeLocator::new(
|
||||
|
|
|
@ -5,55 +5,42 @@ pub mod fixer;
|
|||
pub mod helpers;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
||||
pub struct Patch {
|
||||
pub struct Fix {
|
||||
pub content: String,
|
||||
pub location: Location,
|
||||
pub end_location: Location,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct Fix {
|
||||
pub patch: Patch,
|
||||
}
|
||||
|
||||
impl Fix {
|
||||
pub fn deletion(start: Location, end: Location) -> Self {
|
||||
Self {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location: start,
|
||||
end_location: end,
|
||||
},
|
||||
content: String::new(),
|
||||
location: start,
|
||||
end_location: end,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn replacement(content: String, start: Location, end: Location) -> Self {
|
||||
Self {
|
||||
patch: Patch {
|
||||
content,
|
||||
location: start,
|
||||
end_location: end,
|
||||
},
|
||||
content,
|
||||
location: start,
|
||||
end_location: end,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn insertion(content: String, at: Location) -> Self {
|
||||
Self {
|
||||
patch: Patch {
|
||||
content,
|
||||
location: at,
|
||||
end_location: at,
|
||||
},
|
||||
content,
|
||||
location: at,
|
||||
end_location: at,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn dummy(location: Location) -> Self {
|
||||
Self {
|
||||
patch: Patch {
|
||||
content: String::new(),
|
||||
location,
|
||||
end_location: location,
|
||||
},
|
||||
content: String::new(),
|
||||
location,
|
||||
end_location: location,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2990,7 +2990,7 @@ impl<'a> Checker<'a> {
|
|||
&deleted,
|
||||
) {
|
||||
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);
|
||||
}
|
||||
Some(fix)
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 3
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 6
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 5
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
- kind: CommentedOutCode
|
||||
location:
|
||||
row: 12
|
||||
|
@ -74,12 +70,11 @@ expression: checks
|
|||
row: 12
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 5
|
||||
fix:
|
||||
patch:
|
||||
content: _i
|
||||
location:
|
||||
row: 6
|
||||
column: 4
|
||||
end_location:
|
||||
row: 6
|
||||
column: 5
|
||||
content: _i
|
||||
location:
|
||||
row: 6
|
||||
column: 4
|
||||
end_location:
|
||||
row: 6
|
||||
column: 5
|
||||
- kind:
|
||||
UnusedLoopControlVariable: k
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: _k
|
||||
location:
|
||||
row: 18
|
||||
column: 12
|
||||
end_location:
|
||||
row: 18
|
||||
column: 13
|
||||
content: _k
|
||||
location:
|
||||
row: 18
|
||||
column: 12
|
||||
end_location:
|
||||
row: 18
|
||||
column: 13
|
||||
- kind:
|
||||
UnusedLoopControlVariable: i
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 30
|
||||
column: 5
|
||||
fix:
|
||||
patch:
|
||||
content: _i
|
||||
location:
|
||||
row: 30
|
||||
column: 4
|
||||
end_location:
|
||||
row: 30
|
||||
column: 5
|
||||
content: _i
|
||||
location:
|
||||
row: 30
|
||||
column: 4
|
||||
end_location:
|
||||
row: 30
|
||||
column: 5
|
||||
- kind:
|
||||
UnusedLoopControlVariable: k
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 30
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: _k
|
||||
location:
|
||||
row: 30
|
||||
column: 12
|
||||
end_location:
|
||||
row: 30
|
||||
column: 13
|
||||
content: _k
|
||||
location:
|
||||
row: 30
|
||||
column: 12
|
||||
end_location:
|
||||
row: 30
|
||||
column: 13
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: foo.bar
|
||||
location:
|
||||
row: 18
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 19
|
||||
content: foo.bar
|
||||
location:
|
||||
row: 18
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 19
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 19
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 19
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: foo._123abc
|
||||
location:
|
||||
row: 19
|
||||
column: 0
|
||||
end_location:
|
||||
row: 19
|
||||
column: 23
|
||||
content: foo._123abc
|
||||
location:
|
||||
row: 19
|
||||
column: 0
|
||||
end_location:
|
||||
row: 19
|
||||
column: 23
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 20
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 20
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: foo.abc123
|
||||
location:
|
||||
row: 20
|
||||
column: 0
|
||||
end_location:
|
||||
row: 20
|
||||
column: 22
|
||||
content: foo.abc123
|
||||
location:
|
||||
row: 20
|
||||
column: 0
|
||||
end_location:
|
||||
row: 20
|
||||
column: 22
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 21
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 21
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: foo.abc123
|
||||
location:
|
||||
row: 21
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 23
|
||||
content: foo.abc123
|
||||
location:
|
||||
row: 21
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 23
|
||||
- kind: GetAttrWithConstant
|
||||
location:
|
||||
row: 22
|
||||
|
@ -74,12 +70,11 @@ expression: checks
|
|||
row: 22
|
||||
column: 31
|
||||
fix:
|
||||
patch:
|
||||
content: x.bar
|
||||
location:
|
||||
row: 22
|
||||
column: 14
|
||||
end_location:
|
||||
row: 22
|
||||
column: 31
|
||||
content: x.bar
|
||||
location:
|
||||
row: 22
|
||||
column: 14
|
||||
end_location:
|
||||
row: 22
|
||||
column: 31
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 33
|
||||
column: 25
|
||||
fix:
|
||||
patch:
|
||||
content: foo.bar = None
|
||||
location:
|
||||
row: 33
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 25
|
||||
content: foo.bar = None
|
||||
location:
|
||||
row: 33
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 25
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 34
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 34
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: foo._123abc = None
|
||||
location:
|
||||
row: 34
|
||||
column: 0
|
||||
end_location:
|
||||
row: 34
|
||||
column: 29
|
||||
content: foo._123abc = None
|
||||
location:
|
||||
row: 34
|
||||
column: 0
|
||||
end_location:
|
||||
row: 34
|
||||
column: 29
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 35
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 35
|
||||
column: 28
|
||||
fix:
|
||||
patch:
|
||||
content: foo.abc123 = None
|
||||
location:
|
||||
row: 35
|
||||
column: 0
|
||||
end_location:
|
||||
row: 35
|
||||
column: 28
|
||||
content: foo.abc123 = None
|
||||
location:
|
||||
row: 35
|
||||
column: 0
|
||||
end_location:
|
||||
row: 35
|
||||
column: 28
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 36
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 36
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: foo.abc123 = None
|
||||
location:
|
||||
row: 36
|
||||
column: 0
|
||||
end_location:
|
||||
row: 36
|
||||
column: 29
|
||||
content: foo.abc123 = None
|
||||
location:
|
||||
row: 36
|
||||
column: 0
|
||||
end_location:
|
||||
row: 36
|
||||
column: 29
|
||||
- kind: SetAttrWithConstant
|
||||
location:
|
||||
row: 37
|
||||
|
@ -74,12 +70,11 @@ expression: checks
|
|||
row: 37
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: foo.bar.baz = None
|
||||
location:
|
||||
row: 37
|
||||
column: 0
|
||||
end_location:
|
||||
row: 37
|
||||
column: 30
|
||||
content: foo.bar.baz = None
|
||||
location:
|
||||
row: 37
|
||||
column: 0
|
||||
end_location:
|
||||
row: 37
|
||||
column: 30
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: raise AssertionError()
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 12
|
||||
content: raise AssertionError()
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 12
|
||||
- kind: DoNotAssertFalse
|
||||
location:
|
||||
row: 10
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 10
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: "raise AssertionError('message')"
|
||||
location:
|
||||
row: 10
|
||||
column: 0
|
||||
end_location:
|
||||
row: 10
|
||||
column: 23
|
||||
content: "raise AssertionError('message')"
|
||||
location:
|
||||
row: 10
|
||||
column: 0
|
||||
end_location:
|
||||
row: 10
|
||||
column: 23
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ expression: checks
|
|||
row: 3
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: ValueError
|
||||
location:
|
||||
row: 3
|
||||
column: 7
|
||||
end_location:
|
||||
row: 3
|
||||
column: 20
|
||||
content: ValueError
|
||||
location:
|
||||
row: 3
|
||||
column: 7
|
||||
end_location:
|
||||
row: 3
|
||||
column: 20
|
||||
|
||||
|
|
|
@ -12,14 +12,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: "OSError,"
|
||||
location:
|
||||
row: 17
|
||||
column: 8
|
||||
end_location:
|
||||
row: 17
|
||||
column: 24
|
||||
content: "OSError,"
|
||||
location:
|
||||
row: 17
|
||||
column: 8
|
||||
end_location:
|
||||
row: 17
|
||||
column: 24
|
||||
- kind:
|
||||
DuplicateHandlerException:
|
||||
- MyError
|
||||
|
@ -30,14 +29,13 @@ expression: checks
|
|||
row: 28
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: "MyError,"
|
||||
location:
|
||||
row: 28
|
||||
column: 8
|
||||
end_location:
|
||||
row: 28
|
||||
column: 24
|
||||
content: "MyError,"
|
||||
location:
|
||||
row: 28
|
||||
column: 8
|
||||
end_location:
|
||||
row: 28
|
||||
column: 24
|
||||
- kind:
|
||||
DuplicateHandlerException:
|
||||
- re.error
|
||||
|
@ -48,12 +46,11 @@ expression: checks
|
|||
row: 49
|
||||
column: 26
|
||||
fix:
|
||||
patch:
|
||||
content: "re.error,"
|
||||
location:
|
||||
row: 49
|
||||
column: 8
|
||||
end_location:
|
||||
row: 49
|
||||
column: 26
|
||||
content: "re.error,"
|
||||
location:
|
||||
row: 49
|
||||
column: 8
|
||||
end_location:
|
||||
row: 49
|
||||
column: 26
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: "[x for x in range(3)]"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 29
|
||||
content: "[x for x in range(3)]"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 29
|
||||
- kind: UnnecessaryGeneratorList
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "[\n x for x in range(3)\n]"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
content: "[\n x for x in range(3)\n]"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 28
|
||||
fix:
|
||||
patch:
|
||||
content: "{x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 28
|
||||
content: "{x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 28
|
||||
- kind: UnnecessaryGeneratorSet
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "{\n x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
content: "{\n x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: "{x: x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
content: "{x: x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
- kind: UnnecessaryGeneratorDict
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "{\n x: x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
content: "{\n x: x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: "{x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
content: "{x for x in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 30
|
||||
- kind: UnnecessaryListComprehensionSet
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "{\n x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
content: "{\n x for x in range(3)\n}"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 4
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 1
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: "{i: i for i in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 32
|
||||
content: "{i: i for i in range(3)}"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 32
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: "{1, 2}"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 16
|
||||
content: "{1, 2}"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 16
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: tuple
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: "{1, 2}"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 16
|
||||
content: "{1, 2}"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 16
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: list
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: set()
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 12
|
||||
content: set()
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 12
|
||||
- kind:
|
||||
UnnecessaryLiteralSet: tuple
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: set()
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 12
|
||||
content: set()
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 12
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: "{1: 2}"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 19
|
||||
content: "{1: 2}"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 19
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: tuple
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: "{1: 2,}"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
content: "{1: 2,}"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: list
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "{}"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 13
|
||||
content: "{}"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 13
|
||||
- kind:
|
||||
UnnecessaryLiteralDict: tuple
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "{}"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 13
|
||||
content: "{}"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 13
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: ()
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 11
|
||||
content: ()
|
||||
location:
|
||||
row: 1
|
||||
column: 4
|
||||
end_location:
|
||||
row: 1
|
||||
column: 11
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: list
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: "[]"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 2
|
||||
column: 10
|
||||
content: "[]"
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 2
|
||||
column: 10
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: dict
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: "{}"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 11
|
||||
content: "{}"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 11
|
||||
- kind:
|
||||
UnnecessaryCollectionCall: dict
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: "{\"a\": 1}"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 14
|
||||
content: "{\"a\": 1}"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 14
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: ()
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 14
|
||||
content: ()
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 14
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: list
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 18
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 18
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: tuple
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 18
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 18
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: list
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 7
|
||||
column: 2
|
||||
fix:
|
||||
patch:
|
||||
content: "(\n 1,\n 2\n)"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 7
|
||||
column: 2
|
||||
content: "(\n 1,\n 2\n)"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 7
|
||||
column: 2
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinTupleCall: tuple
|
||||
location:
|
||||
|
@ -79,12 +75,11 @@ expression: checks
|
|||
row: 10
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 8
|
||||
column: 5
|
||||
end_location:
|
||||
row: 10
|
||||
column: 1
|
||||
content: "(1, 2)"
|
||||
location:
|
||||
row: 8
|
||||
column: 5
|
||||
end_location:
|
||||
row: 10
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "[1, 2]"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 17
|
||||
content: "[1, 2]"
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 17
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinListCall: tuple
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "[1, 2]"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 17
|
||||
content: "[1, 2]"
|
||||
location:
|
||||
row: 2
|
||||
column: 5
|
||||
end_location:
|
||||
row: 2
|
||||
column: 17
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinListCall: list
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "[]"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 13
|
||||
content: "[]"
|
||||
location:
|
||||
row: 3
|
||||
column: 5
|
||||
end_location:
|
||||
row: 3
|
||||
column: 13
|
||||
- kind:
|
||||
UnnecessaryLiteralWithinListCall: tuple
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "[]"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 13
|
||||
content: "[]"
|
||||
location:
|
||||
row: 4
|
||||
column: 5
|
||||
end_location:
|
||||
row: 4
|
||||
column: 13
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 2
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: "[i for i in x]"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
content: "[i for i in x]"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: sorted(x)
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 15
|
||||
content: sorted(x)
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 15
|
||||
- kind:
|
||||
UnnecessaryCallAroundSorted: reversed
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: "sorted(x, reverse=True)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 19
|
||||
content: "sorted(x, reverse=True)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 19
|
||||
- kind:
|
||||
UnnecessaryCallAroundSorted: reversed
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 36
|
||||
fix:
|
||||
patch:
|
||||
content: "sorted(x, key=lambda e: e, reverse=True)"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 36
|
||||
content: "sorted(x, key=lambda e: e, reverse=True)"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 36
|
||||
- kind:
|
||||
UnnecessaryCallAroundSorted: reversed
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 33
|
||||
fix:
|
||||
patch:
|
||||
content: "sorted(x, reverse=True)"
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 33
|
||||
content: "sorted(x, reverse=True)"
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 33
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: list(x)
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
content: list(x)
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
- kind:
|
||||
UnnecessaryComprehension: set
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 3
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: set(x)
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 14
|
||||
content: set(x)
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 14
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pub fn print_call(checker: &mut Checker, expr: &Expr, func: &Expr) {
|
|||
&deleted,
|
||||
) {
|
||||
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);
|
||||
}
|
||||
check.amend(fix);
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 1
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
- kind: PPrintFound
|
||||
location:
|
||||
row: 8
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 8
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 9
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 9
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 8
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 0
|
||||
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:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "from collections import (\n AsyncIterable,\n Awaitable,\n ChainMap,\n Collection,\n MutableMapping,\n MutableSequence,\n)\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
content: "from collections import (\n AsyncIterable,\n Awaitable,\n ChainMap,\n Collection,\n MutableMapping,\n MutableSequence,\n)\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 26
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 26
|
||||
column: 0
|
||||
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:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 26
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport os as os1\nimport os as os2\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: "import os\nimport os as os1\nimport os as os2\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 15
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 15
|
||||
column: 0
|
||||
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:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 15
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
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:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 3
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nfrom collections import Collection\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: "import os\nfrom collections import Collection\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 9
|
||||
fix:
|
||||
patch:
|
||||
content: "\nimport os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 7
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: "\nimport os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 7
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
- kind: UnsortedImports
|
||||
location:
|
||||
row: 5
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "\n import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 11
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
content: "\n import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 11
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 13
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
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:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "from ..a import a\nfrom ..b import a\nfrom .a import a\nfrom .b import a\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: "from ..a import a\nfrom ..b import a\nfrom .a import a\nfrom .b import a\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 12
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 12
|
||||
column: 0
|
||||
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:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 12
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
- kind: UnsortedImports
|
||||
location:
|
||||
row: 5
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 7
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 3
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: "import os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport sys\n\nimport numpy as np\n\nimport leading_prefix\nfrom leading_prefix import Class\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
content: "import os\nimport sys\n\nimport numpy as np\n\nimport leading_prefix\nfrom leading_prefix import Class\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 4
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "from __future__ import annotations\n\nimport os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: "from __future__ import annotations\n\nimport os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport sys\n\nimport leading_prefix\n\nfrom . import leading_prefix\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: "import os\nimport sys\n\nimport leading_prefix\n\nfrom . import leading_prefix\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport sys\n\nimport numpy as np\nimport pandas as pd\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: "import os\nimport sys\n\nimport numpy as np\nimport pandas as pd\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 11
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: "import abc\nimport collections\n"
|
||||
location:
|
||||
row: 9
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 0
|
||||
content: "import abc\nimport collections\n"
|
||||
location:
|
||||
row: 9
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 27
|
||||
column: 0
|
||||
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"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 27
|
||||
column: 0
|
||||
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:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 27
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 9
|
||||
fix:
|
||||
patch:
|
||||
content: "import os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: "import os\nimport sys\n"
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
- kind: UnsortedImports
|
||||
location:
|
||||
row: 5
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
content: " import os\n import sys\n"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: res is None
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
content: res is None
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
- kind:
|
||||
NoneComparison: NotEq
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: res is not None
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 14
|
||||
content: res is not None
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 14
|
||||
- kind:
|
||||
NoneComparison: Eq
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: None is res
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
content: None is res
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
- kind:
|
||||
NoneComparison: NotEq
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: None is not res
|
||||
location:
|
||||
row: 11
|
||||
column: 3
|
||||
end_location:
|
||||
row: 11
|
||||
column: 14
|
||||
content: None is not res
|
||||
location:
|
||||
row: 11
|
||||
column: 3
|
||||
end_location:
|
||||
row: 11
|
||||
column: 14
|
||||
- kind:
|
||||
NoneComparison: Eq
|
||||
location:
|
||||
|
@ -79,14 +75,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "res[1] is None"
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 17
|
||||
content: "res[1] is None"
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 17
|
||||
- kind:
|
||||
NoneComparison: NotEq
|
||||
location:
|
||||
|
@ -96,14 +91,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "res[1] is not None"
|
||||
location:
|
||||
row: 17
|
||||
column: 3
|
||||
end_location:
|
||||
row: 17
|
||||
column: 17
|
||||
content: "res[1] is not None"
|
||||
location:
|
||||
row: 17
|
||||
column: 3
|
||||
end_location:
|
||||
row: 17
|
||||
column: 17
|
||||
- kind:
|
||||
NoneComparison: NotEq
|
||||
location:
|
||||
|
@ -113,14 +107,13 @@ expression: checks
|
|||
row: 20
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "None is not res[1]"
|
||||
location:
|
||||
row: 20
|
||||
column: 3
|
||||
end_location:
|
||||
row: 20
|
||||
column: 17
|
||||
content: "None is not res[1]"
|
||||
location:
|
||||
row: 20
|
||||
column: 3
|
||||
end_location:
|
||||
row: 20
|
||||
column: 17
|
||||
- kind:
|
||||
NoneComparison: Eq
|
||||
location:
|
||||
|
@ -130,14 +123,13 @@ expression: checks
|
|||
row: 23
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "None is res[1]"
|
||||
location:
|
||||
row: 23
|
||||
column: 3
|
||||
end_location:
|
||||
row: 23
|
||||
column: 17
|
||||
content: "None is res[1]"
|
||||
location:
|
||||
row: 23
|
||||
column: 3
|
||||
end_location:
|
||||
row: 23
|
||||
column: 17
|
||||
- kind:
|
||||
NoneComparison: Eq
|
||||
location:
|
||||
|
@ -147,14 +139,13 @@ expression: checks
|
|||
row: 26
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 26
|
||||
column: 3
|
||||
end_location:
|
||||
row: 26
|
||||
column: 3
|
||||
content: ""
|
||||
location:
|
||||
row: 26
|
||||
column: 3
|
||||
end_location:
|
||||
row: 26
|
||||
column: 3
|
||||
- kind:
|
||||
NoneComparison: NotEq
|
||||
location:
|
||||
|
@ -164,12 +155,11 @@ expression: checks
|
|||
row: 26
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: x is None is not None
|
||||
location:
|
||||
row: 26
|
||||
column: 3
|
||||
end_location:
|
||||
row: 26
|
||||
column: 20
|
||||
content: x is None is not None
|
||||
location:
|
||||
row: 26
|
||||
column: 3
|
||||
end_location:
|
||||
row: 26
|
||||
column: 20
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: res is True
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
content: res is True
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 14
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- false
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: res is not False
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
content: res is not False
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- true
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: True is not res
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
content: True is not res
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- false
|
||||
|
@ -70,14 +67,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 8
|
||||
fix:
|
||||
patch:
|
||||
content: False is res
|
||||
location:
|
||||
row: 11
|
||||
column: 3
|
||||
end_location:
|
||||
row: 11
|
||||
column: 15
|
||||
content: False is res
|
||||
location:
|
||||
row: 11
|
||||
column: 3
|
||||
end_location:
|
||||
row: 11
|
||||
column: 15
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- true
|
||||
|
@ -89,14 +85,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "res[1] is True"
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 17
|
||||
content: "res[1] is True"
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 17
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- false
|
||||
|
@ -108,14 +103,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: "res[1] is not False"
|
||||
location:
|
||||
row: 17
|
||||
column: 3
|
||||
end_location:
|
||||
row: 17
|
||||
column: 18
|
||||
content: "res[1] is not False"
|
||||
location:
|
||||
row: 17
|
||||
column: 3
|
||||
end_location:
|
||||
row: 17
|
||||
column: 18
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- true
|
||||
|
@ -127,14 +121,13 @@ expression: checks
|
|||
row: 20
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: cond is True
|
||||
location:
|
||||
row: 20
|
||||
column: 11
|
||||
end_location:
|
||||
row: 20
|
||||
column: 23
|
||||
content: cond is True
|
||||
location:
|
||||
row: 20
|
||||
column: 11
|
||||
end_location:
|
||||
row: 20
|
||||
column: 23
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- false
|
||||
|
@ -146,14 +139,13 @@ expression: checks
|
|||
row: 20
|
||||
column: 48
|
||||
fix:
|
||||
patch:
|
||||
content: cond is False
|
||||
location:
|
||||
row: 20
|
||||
column: 35
|
||||
end_location:
|
||||
row: 20
|
||||
column: 48
|
||||
content: cond is False
|
||||
location:
|
||||
row: 20
|
||||
column: 35
|
||||
end_location:
|
||||
row: 20
|
||||
column: 48
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- true
|
||||
|
@ -165,14 +157,13 @@ expression: checks
|
|||
row: 22
|
||||
column: 8
|
||||
fix:
|
||||
patch:
|
||||
content: True is TrueElement
|
||||
location:
|
||||
row: 22
|
||||
column: 3
|
||||
end_location:
|
||||
row: 22
|
||||
column: 24
|
||||
content: True is TrueElement
|
||||
location:
|
||||
row: 22
|
||||
column: 3
|
||||
end_location:
|
||||
row: 22
|
||||
column: 24
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- true
|
||||
|
@ -184,14 +175,13 @@ expression: checks
|
|||
row: 25
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 25
|
||||
column: 3
|
||||
end_location:
|
||||
row: 25
|
||||
column: 3
|
||||
content: ""
|
||||
location:
|
||||
row: 25
|
||||
column: 3
|
||||
end_location:
|
||||
row: 25
|
||||
column: 3
|
||||
- kind:
|
||||
TrueFalseComparison:
|
||||
- false
|
||||
|
@ -203,12 +193,11 @@ expression: checks
|
|||
row: 25
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: res is True is not False
|
||||
location:
|
||||
row: 25
|
||||
column: 3
|
||||
end_location:
|
||||
row: 25
|
||||
column: 23
|
||||
content: res is True is not False
|
||||
location:
|
||||
row: 25
|
||||
column: 3
|
||||
end_location:
|
||||
row: 25
|
||||
column: 23
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 13
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 13
|
||||
- kind: NotInTest
|
||||
location:
|
||||
row: 5
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: X.B not in Y
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
content: X.B not in Y
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
- kind: NotInTest
|
||||
location:
|
||||
row: 8
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 13
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 8
|
||||
column: 3
|
||||
end_location:
|
||||
row: 8
|
||||
column: 13
|
||||
- kind: NotInTest
|
||||
location:
|
||||
row: 11
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 28
|
||||
fix:
|
||||
patch:
|
||||
content: Y not in Z
|
||||
location:
|
||||
row: 11
|
||||
column: 18
|
||||
end_location:
|
||||
row: 11
|
||||
column: 28
|
||||
content: Y not in Z
|
||||
location:
|
||||
row: 11
|
||||
column: 18
|
||||
end_location:
|
||||
row: 11
|
||||
column: 28
|
||||
- kind: NotInTest
|
||||
location:
|
||||
row: 14
|
||||
|
@ -74,12 +70,11 @@ expression: checks
|
|||
row: 14
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 15
|
||||
content: X not in Y
|
||||
location:
|
||||
row: 14
|
||||
column: 3
|
||||
end_location:
|
||||
row: 14
|
||||
column: 15
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: X is not Y
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 13
|
||||
content: X is not Y
|
||||
location:
|
||||
row: 2
|
||||
column: 3
|
||||
end_location:
|
||||
row: 2
|
||||
column: 13
|
||||
- kind: NotIsTest
|
||||
location:
|
||||
row: 5
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: X.B is not Y
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
content: X.B is not Y
|
||||
location:
|
||||
row: 5
|
||||
column: 3
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
- kind: NotIsTest
|
||||
location:
|
||||
row: 8
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: "def f(x):\n return (2 * x)"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 19
|
||||
content: "def f(x):\n return (2 * x)"
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 19
|
||||
- kind: DoNotAssignLambda
|
||||
location:
|
||||
row: 4
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: "def f(x):\n return (2 * x)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 19
|
||||
content: "def f(x):\n return (2 * x)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 19
|
||||
- kind: DoNotAssignLambda
|
||||
location:
|
||||
row: 7
|
||||
|
@ -42,12 +40,11 @@ expression: checks
|
|||
row: 7
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: "def this(y, z):\n return (2 * x)"
|
||||
location:
|
||||
row: 7
|
||||
column: 4
|
||||
end_location:
|
||||
row: 7
|
||||
column: 29
|
||||
content: "def this(y, z):\n return (2 * x)"
|
||||
location:
|
||||
row: 7
|
||||
column: 4
|
||||
end_location:
|
||||
row: 7
|
||||
column: 29
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 137
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 136
|
||||
column: 0
|
||||
end_location:
|
||||
row: 137
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 136
|
||||
column: 0
|
||||
end_location:
|
||||
row: 137
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineBeforeFunction: 1
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 151
|
||||
column: 37
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 150
|
||||
column: 0
|
||||
end_location:
|
||||
row: 151
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 150
|
||||
column: 0
|
||||
end_location:
|
||||
row: 151
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineBeforeFunction: 1
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 549
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 545
|
||||
column: 0
|
||||
end_location:
|
||||
row: 546
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 545
|
||||
column: 0
|
||||
end_location:
|
||||
row: 546
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineBeforeFunction: 1
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 571
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 567
|
||||
column: 0
|
||||
end_location:
|
||||
row: 568
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 567
|
||||
column: 0
|
||||
end_location:
|
||||
row: 568
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 142
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 143
|
||||
column: 0
|
||||
end_location:
|
||||
row: 144
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 143
|
||||
column: 0
|
||||
end_location:
|
||||
row: 144
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineAfterFunction: 1
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 151
|
||||
column: 37
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 152
|
||||
column: 0
|
||||
end_location:
|
||||
row: 153
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 152
|
||||
column: 0
|
||||
end_location:
|
||||
row: 153
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineAfterFunction: 1
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 558
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 559
|
||||
column: 0
|
||||
end_location:
|
||||
row: 560
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 559
|
||||
column: 0
|
||||
end_location:
|
||||
row: 560
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineAfterFunction: 1
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 571
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 572
|
||||
column: 0
|
||||
end_location:
|
||||
row: 573
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 572
|
||||
column: 0
|
||||
end_location:
|
||||
row: 573
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 161
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 161
|
||||
column: 0
|
||||
end_location:
|
||||
row: 161
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 161
|
||||
column: 0
|
||||
end_location:
|
||||
row: 161
|
||||
column: 0
|
||||
- kind:
|
||||
OneBlankLineBeforeClass: 0
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 192
|
||||
column: 45
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 192
|
||||
column: 0
|
||||
end_location:
|
||||
row: 192
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 192
|
||||
column: 0
|
||||
end_location:
|
||||
row: 192
|
||||
column: 0
|
||||
- kind:
|
||||
OneBlankLineBeforeClass: 0
|
||||
location:
|
||||
|
@ -45,12 +43,11 @@ expression: checks
|
|||
row: 532
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 526
|
||||
column: 0
|
||||
end_location:
|
||||
row: 526
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 526
|
||||
column: 0
|
||||
end_location:
|
||||
row: 526
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 181
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 182
|
||||
column: 0
|
||||
end_location:
|
||||
row: 182
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 182
|
||||
column: 0
|
||||
end_location:
|
||||
row: 182
|
||||
column: 0
|
||||
- kind:
|
||||
OneBlankLineAfterClass: 0
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 192
|
||||
column: 45
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 193
|
||||
column: 0
|
||||
end_location:
|
||||
row: 193
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 193
|
||||
column: 0
|
||||
end_location:
|
||||
row: 193
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 203
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 201
|
||||
column: 0
|
||||
end_location:
|
||||
row: 201
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 201
|
||||
column: 0
|
||||
end_location:
|
||||
row: 201
|
||||
column: 0
|
||||
- kind: BlankLineAfterSummary
|
||||
location:
|
||||
row: 210
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 215
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 211
|
||||
column: 0
|
||||
end_location:
|
||||
row: 213
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 211
|
||||
column: 0
|
||||
end_location:
|
||||
row: 213
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 232
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 232
|
||||
column: 0
|
||||
end_location:
|
||||
row: 232
|
||||
column: 0
|
||||
content: " "
|
||||
location:
|
||||
row: 232
|
||||
column: 0
|
||||
end_location:
|
||||
row: 232
|
||||
column: 0
|
||||
- kind: NoUnderIndentation
|
||||
location:
|
||||
row: 440
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 440
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 440
|
||||
column: 0
|
||||
end_location:
|
||||
row: 440
|
||||
column: 4
|
||||
content: " "
|
||||
location:
|
||||
row: 440
|
||||
column: 0
|
||||
end_location:
|
||||
row: 440
|
||||
column: 4
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 252
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 252
|
||||
column: 0
|
||||
end_location:
|
||||
row: 252
|
||||
column: 7
|
||||
content: " "
|
||||
location:
|
||||
row: 252
|
||||
column: 0
|
||||
end_location:
|
||||
row: 252
|
||||
column: 7
|
||||
- kind: NoOverIndentation
|
||||
location:
|
||||
row: 264
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 264
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 264
|
||||
column: 0
|
||||
end_location:
|
||||
row: 264
|
||||
column: 8
|
||||
content: " "
|
||||
location:
|
||||
row: 264
|
||||
column: 0
|
||||
end_location:
|
||||
row: 264
|
||||
column: 8
|
||||
- kind: NoOverIndentation
|
||||
location:
|
||||
row: 272
|
||||
|
@ -42,12 +40,11 @@ expression: checks
|
|||
row: 272
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 272
|
||||
column: 0
|
||||
end_location:
|
||||
row: 272
|
||||
column: 8
|
||||
content: " "
|
||||
location:
|
||||
row: 272
|
||||
column: 0
|
||||
end_location:
|
||||
row: 272
|
||||
column: 8
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 283
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: "\n "
|
||||
location:
|
||||
row: 283
|
||||
column: 16
|
||||
end_location:
|
||||
row: 283
|
||||
column: 16
|
||||
content: "\n "
|
||||
location:
|
||||
row: 283
|
||||
column: 16
|
||||
end_location:
|
||||
row: 283
|
||||
column: 16
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 288
|
||||
column: 33
|
||||
fix:
|
||||
patch:
|
||||
content: Whitespace at the end.
|
||||
location:
|
||||
row: 288
|
||||
column: 7
|
||||
end_location:
|
||||
row: 288
|
||||
column: 30
|
||||
content: Whitespace at the end.
|
||||
location:
|
||||
row: 288
|
||||
column: 7
|
||||
end_location:
|
||||
row: 288
|
||||
column: 30
|
||||
- kind: NoSurroundingWhitespace
|
||||
location:
|
||||
row: 293
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 293
|
||||
column: 37
|
||||
fix:
|
||||
patch:
|
||||
content: Whitespace at everywhere.
|
||||
location:
|
||||
row: 293
|
||||
column: 7
|
||||
end_location:
|
||||
row: 293
|
||||
column: 34
|
||||
content: Whitespace at everywhere.
|
||||
location:
|
||||
row: 293
|
||||
column: 7
|
||||
end_location:
|
||||
row: 293
|
||||
column: 34
|
||||
- kind: NoSurroundingWhitespace
|
||||
location:
|
||||
row: 299
|
||||
|
@ -42,12 +40,11 @@ expression: checks
|
|||
row: 302
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: Whitespace at the beginning.
|
||||
location:
|
||||
row: 299
|
||||
column: 7
|
||||
end_location:
|
||||
row: 299
|
||||
column: 36
|
||||
content: Whitespace at the beginning.
|
||||
location:
|
||||
row: 299
|
||||
column: 7
|
||||
end_location:
|
||||
row: 299
|
||||
column: 36
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 170
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 169
|
||||
column: 0
|
||||
end_location:
|
||||
row: 170
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 169
|
||||
column: 0
|
||||
end_location:
|
||||
row: 170
|
||||
column: 0
|
||||
- kind:
|
||||
NoBlankLineBeforeClass: 1
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 181
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 180
|
||||
column: 0
|
||||
end_location:
|
||||
row: 181
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 180
|
||||
column: 0
|
||||
end_location:
|
||||
row: 181
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ expression: checks
|
|||
row: 141
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 137
|
||||
column: 0
|
||||
end_location:
|
||||
row: 137
|
||||
column: 8
|
||||
content: " "
|
||||
location:
|
||||
row: 137
|
||||
column: 0
|
||||
end_location:
|
||||
row: 137
|
||||
column: 8
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 153
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 150
|
||||
column: 0
|
||||
end_location:
|
||||
row: 150
|
||||
column: 9
|
||||
content: " "
|
||||
location:
|
||||
row: 150
|
||||
column: 0
|
||||
end_location:
|
||||
row: 150
|
||||
column: 9
|
||||
- kind:
|
||||
SectionUnderlineNotOverIndented: Returns
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 165
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " "
|
||||
location:
|
||||
row: 164
|
||||
column: 0
|
||||
end_location:
|
||||
row: 164
|
||||
column: 9
|
||||
content: " "
|
||||
location:
|
||||
row: 164
|
||||
column: 0
|
||||
end_location:
|
||||
row: 164
|
||||
column: 9
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 23
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: Returns
|
||||
location:
|
||||
row: 19
|
||||
column: 4
|
||||
end_location:
|
||||
row: 19
|
||||
column: 11
|
||||
content: Returns
|
||||
location:
|
||||
row: 19
|
||||
column: 4
|
||||
end_location:
|
||||
row: 19
|
||||
column: 11
|
||||
- kind:
|
||||
CapitalizeSectionName: Short summary
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: Short Summary
|
||||
location:
|
||||
row: 209
|
||||
column: 4
|
||||
end_location:
|
||||
row: 209
|
||||
column: 17
|
||||
content: Short Summary
|
||||
location:
|
||||
row: 209
|
||||
column: 4
|
||||
end_location:
|
||||
row: 209
|
||||
column: 17
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 36
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 32
|
||||
column: 11
|
||||
end_location:
|
||||
row: 32
|
||||
column: 12
|
||||
content: ""
|
||||
location:
|
||||
row: 32
|
||||
column: 11
|
||||
end_location:
|
||||
row: 32
|
||||
column: 12
|
||||
- kind:
|
||||
NewLineAfterSectionName: Raises
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 218
|
||||
column: 10
|
||||
end_location:
|
||||
row: 218
|
||||
column: 11
|
||||
content: ""
|
||||
location:
|
||||
row: 218
|
||||
column: 10
|
||||
end_location:
|
||||
row: 218
|
||||
column: 11
|
||||
- kind:
|
||||
NewLineAfterSectionName: Returns
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 262
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 257
|
||||
column: 11
|
||||
end_location:
|
||||
row: 257
|
||||
column: 12
|
||||
content: ""
|
||||
location:
|
||||
row: 257
|
||||
column: 11
|
||||
end_location:
|
||||
row: 257
|
||||
column: 12
|
||||
- kind:
|
||||
NewLineAfterSectionName: Raises
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 262
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 259
|
||||
column: 10
|
||||
end_location:
|
||||
row: 259
|
||||
column: 11
|
||||
content: ""
|
||||
location:
|
||||
row: 259
|
||||
column: 10
|
||||
end_location:
|
||||
row: 259
|
||||
column: 11
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 47
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 45
|
||||
column: 0
|
||||
end_location:
|
||||
row: 45
|
||||
column: 0
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 45
|
||||
column: 0
|
||||
end_location:
|
||||
row: 45
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Returns
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 58
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 57
|
||||
column: 0
|
||||
end_location:
|
||||
row: 57
|
||||
column: 0
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 57
|
||||
column: 0
|
||||
end_location:
|
||||
row: 57
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Raises
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " ------\n"
|
||||
location:
|
||||
row: 219
|
||||
column: 0
|
||||
end_location:
|
||||
row: 219
|
||||
column: 0
|
||||
content: " ------\n"
|
||||
location:
|
||||
row: 219
|
||||
column: 0
|
||||
end_location:
|
||||
row: 219
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Returns
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 262
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 258
|
||||
column: 0
|
||||
end_location:
|
||||
row: 258
|
||||
column: 0
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 258
|
||||
column: 0
|
||||
end_location:
|
||||
row: 258
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Raises
|
||||
location:
|
||||
|
@ -79,14 +75,13 @@ expression: checks
|
|||
row: 262
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " ------\n"
|
||||
location:
|
||||
row: 260
|
||||
column: 0
|
||||
end_location:
|
||||
row: 260
|
||||
column: 0
|
||||
content: " ------\n"
|
||||
location:
|
||||
row: 260
|
||||
column: 0
|
||||
end_location:
|
||||
row: 260
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -96,14 +91,13 @@ expression: checks
|
|||
row: 274
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 272
|
||||
column: 0
|
||||
end_location:
|
||||
row: 272
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 272
|
||||
column: 0
|
||||
end_location:
|
||||
row: 272
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -113,14 +107,13 @@ expression: checks
|
|||
row: 292
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 289
|
||||
column: 0
|
||||
end_location:
|
||||
row: 289
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 289
|
||||
column: 0
|
||||
end_location:
|
||||
row: 289
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -130,14 +123,13 @@ expression: checks
|
|||
row: 306
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 304
|
||||
column: 0
|
||||
end_location:
|
||||
row: 304
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 304
|
||||
column: 0
|
||||
end_location:
|
||||
row: 304
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -147,14 +139,13 @@ expression: checks
|
|||
row: 319
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 316
|
||||
column: 0
|
||||
end_location:
|
||||
row: 316
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 316
|
||||
column: 0
|
||||
end_location:
|
||||
row: 316
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -164,14 +155,13 @@ expression: checks
|
|||
row: 330
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 328
|
||||
column: 0
|
||||
end_location:
|
||||
row: 328
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 328
|
||||
column: 0
|
||||
end_location:
|
||||
row: 328
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -181,14 +171,13 @@ expression: checks
|
|||
row: 343
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 340
|
||||
column: 0
|
||||
end_location:
|
||||
row: 340
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 340
|
||||
column: 0
|
||||
end_location:
|
||||
row: 340
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -198,14 +187,13 @@ expression: checks
|
|||
row: 355
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 353
|
||||
column: 0
|
||||
end_location:
|
||||
row: 353
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 353
|
||||
column: 0
|
||||
end_location:
|
||||
row: 353
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -215,14 +203,13 @@ expression: checks
|
|||
row: 367
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 365
|
||||
column: 0
|
||||
end_location:
|
||||
row: 365
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 365
|
||||
column: 0
|
||||
end_location:
|
||||
row: 365
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -232,14 +219,13 @@ expression: checks
|
|||
row: 382
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 374
|
||||
column: 0
|
||||
end_location:
|
||||
row: 374
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 374
|
||||
column: 0
|
||||
end_location:
|
||||
row: 374
|
||||
column: 0
|
||||
- kind:
|
||||
DashedUnderlineAfterSection: Args
|
||||
location:
|
||||
|
@ -249,12 +235,11 @@ expression: checks
|
|||
row: 497
|
||||
column: 11
|
||||
fix:
|
||||
patch:
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 495
|
||||
column: 0
|
||||
end_location:
|
||||
row: 495
|
||||
column: 0
|
||||
content: " ----\n"
|
||||
location:
|
||||
row: 495
|
||||
column: 0
|
||||
end_location:
|
||||
row: 495
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ expression: checks
|
|||
row: 92
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 88
|
||||
column: 0
|
||||
end_location:
|
||||
row: 89
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 88
|
||||
column: 0
|
||||
end_location:
|
||||
row: 89
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 105
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 102
|
||||
column: 0
|
||||
end_location:
|
||||
row: 103
|
||||
column: 0
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 102
|
||||
column: 0
|
||||
end_location:
|
||||
row: 103
|
||||
column: 0
|
||||
- kind:
|
||||
SectionUnderlineMatchesSectionLength: Returns
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 216
|
||||
column: 0
|
||||
end_location:
|
||||
row: 217
|
||||
column: 0
|
||||
content: " -------\n"
|
||||
location:
|
||||
row: 216
|
||||
column: 0
|
||||
end_location:
|
||||
row: 217
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 78
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 71
|
||||
column: 0
|
||||
end_location:
|
||||
row: 71
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 71
|
||||
column: 0
|
||||
end_location:
|
||||
row: 71
|
||||
column: 0
|
||||
- kind:
|
||||
BlankLineAfterSection: Returns
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 218
|
||||
column: 0
|
||||
end_location:
|
||||
row: 218
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 218
|
||||
column: 0
|
||||
end_location:
|
||||
row: 218
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 78
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 71
|
||||
column: 0
|
||||
end_location:
|
||||
row: 71
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 71
|
||||
column: 0
|
||||
end_location:
|
||||
row: 71
|
||||
column: 0
|
||||
- kind:
|
||||
BlankLineBeforeSection: Returns
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 129
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 125
|
||||
column: 0
|
||||
end_location:
|
||||
row: 125
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 125
|
||||
column: 0
|
||||
end_location:
|
||||
row: 125
|
||||
column: 0
|
||||
- kind:
|
||||
BlankLineBeforeSection: Raises
|
||||
location:
|
||||
|
@ -45,12 +43,11 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "\n"
|
||||
location:
|
||||
row: 218
|
||||
column: 0
|
||||
end_location:
|
||||
row: 218
|
||||
column: 0
|
||||
content: "\n"
|
||||
location:
|
||||
row: 218
|
||||
column: 0
|
||||
end_location:
|
||||
row: 218
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ expression: checks
|
|||
row: 221
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 211
|
||||
column: 0
|
||||
end_location:
|
||||
row: 212
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 211
|
||||
column: 0
|
||||
end_location:
|
||||
row: 212
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: import os
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
content: import os
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 20
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- collections.OrderedDict
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: "from collections import (\n Counter,\n namedtuple,\n)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 1
|
||||
content: "from collections import (\n Counter,\n namedtuple,\n)"
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 1
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- logging.handlers
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 12
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 0
|
||||
end_location:
|
||||
row: 13
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- shelve
|
||||
|
@ -70,14 +67,13 @@ expression: checks
|
|||
row: 32
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 32
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 32
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- importlib
|
||||
|
@ -89,14 +85,13 @@ expression: checks
|
|||
row: 33
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: pass
|
||||
location:
|
||||
row: 33
|
||||
column: 4
|
||||
end_location:
|
||||
row: 33
|
||||
column: 20
|
||||
content: pass
|
||||
location:
|
||||
row: 33
|
||||
column: 4
|
||||
end_location:
|
||||
row: 33
|
||||
column: 20
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- pathlib
|
||||
|
@ -108,14 +103,13 @@ expression: checks
|
|||
row: 37
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 37
|
||||
column: 0
|
||||
end_location:
|
||||
row: 38
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 37
|
||||
column: 0
|
||||
end_location:
|
||||
row: 38
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- pickle
|
||||
|
@ -127,12 +121,11 @@ expression: checks
|
|||
row: 52
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: pass
|
||||
location:
|
||||
row: 52
|
||||
column: 8
|
||||
end_location:
|
||||
row: 52
|
||||
column: 21
|
||||
content: pass
|
||||
location:
|
||||
row: 52
|
||||
column: 8
|
||||
end_location:
|
||||
row: 52
|
||||
column: 21
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- d.e.f
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- h.i
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- j.k
|
||||
|
@ -70,12 +67,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 7
|
||||
column: 39
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- datastructures.UploadFile
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 10
|
||||
column: 52
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 10
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 10
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- background
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 17
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 17
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 0
|
||||
- kind:
|
||||
UnusedImport:
|
||||
- datastructures
|
||||
|
@ -70,12 +67,11 @@ expression: checks
|
|||
row: 20
|
||||
column: 35
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 20
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 20
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: "x == \"abc\""
|
||||
location:
|
||||
row: 1
|
||||
column: 3
|
||||
end_location:
|
||||
row: 1
|
||||
column: 13
|
||||
content: "x == \"abc\""
|
||||
location:
|
||||
row: 1
|
||||
column: 3
|
||||
end_location:
|
||||
row: 1
|
||||
column: 13
|
||||
- kind: IsLiteral
|
||||
location:
|
||||
row: 4
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: 123 != y
|
||||
location:
|
||||
row: 4
|
||||
column: 3
|
||||
end_location:
|
||||
row: 4
|
||||
column: 15
|
||||
content: 123 != y
|
||||
location:
|
||||
row: 4
|
||||
column: 3
|
||||
end_location:
|
||||
row: 4
|
||||
column: 15
|
||||
- kind: IsLiteral
|
||||
location:
|
||||
row: 7
|
||||
|
@ -42,12 +40,11 @@ expression: checks
|
|||
row: 7
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "\"123\" == x"
|
||||
location:
|
||||
row: 7
|
||||
column: 3
|
||||
end_location:
|
||||
row: 7
|
||||
column: 13
|
||||
content: "\"123\" == x"
|
||||
location:
|
||||
row: 7
|
||||
column: 3
|
||||
end_location:
|
||||
row: 7
|
||||
column: 13
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: NotImplementedError
|
||||
location:
|
||||
row: 2
|
||||
column: 10
|
||||
end_location:
|
||||
row: 2
|
||||
column: 24
|
||||
content: NotImplementedError
|
||||
location:
|
||||
row: 2
|
||||
column: 10
|
||||
end_location:
|
||||
row: 2
|
||||
column: 24
|
||||
- kind: RaiseNotImplemented
|
||||
location:
|
||||
row: 6
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: NotImplementedError
|
||||
location:
|
||||
row: 6
|
||||
column: 10
|
||||
end_location:
|
||||
row: 6
|
||||
column: 24
|
||||
content: NotImplementedError
|
||||
location:
|
||||
row: 6
|
||||
column: 10
|
||||
end_location:
|
||||
row: 6
|
||||
column: 24
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: "from models import (\n Fruit,\n)"
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 9
|
||||
column: 1
|
||||
content: "from models import (\n Fruit,\n)"
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 9
|
||||
column: 1
|
||||
- kind:
|
||||
UndefinedName: Bar
|
||||
location:
|
||||
|
|
|
@ -71,7 +71,7 @@ pub fn unnecessary_future_import(checker: &mut Checker, stmt: &Stmt, names: &[Lo
|
|||
&deleted,
|
||||
) {
|
||||
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);
|
||||
}
|
||||
check.amend(fix);
|
||||
|
|
|
@ -25,7 +25,7 @@ pub fn useless_metaclass_type(checker: &mut Checker, stmt: &Stmt, value: &Expr,
|
|||
&deleted,
|
||||
) {
|
||||
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);
|
||||
}
|
||||
check.amend(fix);
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: pass
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 2
|
||||
column: 24
|
||||
content: pass
|
||||
location:
|
||||
row: 2
|
||||
column: 4
|
||||
end_location:
|
||||
row: 2
|
||||
column: 24
|
||||
- kind: UselessMetaclassType
|
||||
location:
|
||||
row: 6
|
||||
|
@ -26,12 +25,11 @@ expression: checks
|
|||
row: 6
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 8
|
||||
fix:
|
||||
patch:
|
||||
content: str
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 8
|
||||
content: str
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 1
|
||||
column: 8
|
||||
- kind:
|
||||
TypeOfPrimitive: Bytes
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 9
|
||||
fix:
|
||||
patch:
|
||||
content: bytes
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 9
|
||||
content: bytes
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 9
|
||||
- kind:
|
||||
TypeOfPrimitive: Int
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 7
|
||||
fix:
|
||||
patch:
|
||||
content: int
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 7
|
||||
content: int
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 7
|
||||
- kind:
|
||||
TypeOfPrimitive: Float
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 8
|
||||
fix:
|
||||
patch:
|
||||
content: float
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 8
|
||||
content: float
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 8
|
||||
- kind:
|
||||
TypeOfPrimitive: Complex
|
||||
location:
|
||||
|
@ -79,12 +75,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 8
|
||||
fix:
|
||||
patch:
|
||||
content: complex
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 8
|
||||
content: complex
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 8
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 7
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 7
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 10
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 9
|
||||
column: 7
|
||||
end_location:
|
||||
row: 11
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 9
|
||||
column: 7
|
||||
end_location:
|
||||
row: 11
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 16
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 15
|
||||
column: 7
|
||||
end_location:
|
||||
row: 18
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 15
|
||||
column: 7
|
||||
end_location:
|
||||
row: 18
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 24
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 22
|
||||
column: 7
|
||||
end_location:
|
||||
row: 25
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 22
|
||||
column: 7
|
||||
end_location:
|
||||
row: 25
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -79,14 +75,13 @@ expression: checks
|
|||
row: 31
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 29
|
||||
column: 7
|
||||
end_location:
|
||||
row: 32
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 29
|
||||
column: 7
|
||||
end_location:
|
||||
row: 32
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -96,14 +91,13 @@ expression: checks
|
|||
row: 37
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 36
|
||||
column: 7
|
||||
end_location:
|
||||
row: 39
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 36
|
||||
column: 7
|
||||
end_location:
|
||||
row: 39
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -113,14 +107,13 @@ expression: checks
|
|||
row: 45
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 43
|
||||
column: 7
|
||||
end_location:
|
||||
row: 47
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 43
|
||||
column: 7
|
||||
end_location:
|
||||
row: 47
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -130,14 +123,13 @@ expression: checks
|
|||
row: 53
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 51
|
||||
column: 7
|
||||
end_location:
|
||||
row: 55
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 51
|
||||
column: 7
|
||||
end_location:
|
||||
row: 55
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -147,14 +139,13 @@ expression: checks
|
|||
row: 61
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 59
|
||||
column: 7
|
||||
end_location:
|
||||
row: 63
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 59
|
||||
column: 7
|
||||
end_location:
|
||||
row: 63
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -164,14 +155,13 @@ expression: checks
|
|||
row: 69
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 67
|
||||
column: 7
|
||||
end_location:
|
||||
row: 71
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 67
|
||||
column: 7
|
||||
end_location:
|
||||
row: 71
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -181,14 +171,13 @@ expression: checks
|
|||
row: 75
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 75
|
||||
column: 9
|
||||
end_location:
|
||||
row: 75
|
||||
column: 17
|
||||
content: ""
|
||||
location:
|
||||
row: 75
|
||||
column: 9
|
||||
end_location:
|
||||
row: 75
|
||||
column: 17
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -198,14 +187,13 @@ expression: checks
|
|||
row: 79
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 79
|
||||
column: 8
|
||||
end_location:
|
||||
row: 79
|
||||
column: 16
|
||||
content: ""
|
||||
location:
|
||||
row: 79
|
||||
column: 8
|
||||
end_location:
|
||||
row: 79
|
||||
column: 16
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -215,14 +203,13 @@ expression: checks
|
|||
row: 84
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 84
|
||||
column: 4
|
||||
end_location:
|
||||
row: 85
|
||||
column: 4
|
||||
content: ""
|
||||
location:
|
||||
row: 84
|
||||
column: 4
|
||||
end_location:
|
||||
row: 85
|
||||
column: 4
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -232,14 +219,13 @@ expression: checks
|
|||
row: 92
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 91
|
||||
column: 5
|
||||
end_location:
|
||||
row: 92
|
||||
column: 10
|
||||
content: ""
|
||||
location:
|
||||
row: 91
|
||||
column: 5
|
||||
end_location:
|
||||
row: 92
|
||||
column: 10
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -249,14 +235,13 @@ expression: checks
|
|||
row: 98
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 98
|
||||
column: 4
|
||||
end_location:
|
||||
row: 99
|
||||
column: 4
|
||||
content: ""
|
||||
location:
|
||||
row: 98
|
||||
column: 4
|
||||
end_location:
|
||||
row: 99
|
||||
column: 4
|
||||
- kind:
|
||||
UselessObjectInheritance: B
|
||||
location:
|
||||
|
@ -266,14 +251,13 @@ expression: checks
|
|||
row: 108
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 107
|
||||
column: 5
|
||||
end_location:
|
||||
row: 108
|
||||
column: 10
|
||||
content: ""
|
||||
location:
|
||||
row: 107
|
||||
column: 5
|
||||
end_location:
|
||||
row: 108
|
||||
column: 10
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -283,14 +267,13 @@ expression: checks
|
|||
row: 114
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 114
|
||||
column: 11
|
||||
end_location:
|
||||
row: 114
|
||||
column: 19
|
||||
content: ""
|
||||
location:
|
||||
row: 114
|
||||
column: 11
|
||||
end_location:
|
||||
row: 114
|
||||
column: 19
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -300,14 +283,13 @@ expression: checks
|
|||
row: 119
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 118
|
||||
column: 7
|
||||
end_location:
|
||||
row: 120
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 118
|
||||
column: 7
|
||||
end_location:
|
||||
row: 120
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -317,14 +299,13 @@ expression: checks
|
|||
row: 125
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 124
|
||||
column: 7
|
||||
end_location:
|
||||
row: 126
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 124
|
||||
column: 7
|
||||
end_location:
|
||||
row: 126
|
||||
column: 1
|
||||
- kind:
|
||||
UselessObjectInheritance: A
|
||||
location:
|
||||
|
@ -334,12 +315,11 @@ expression: checks
|
|||
row: 131
|
||||
column: 10
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 130
|
||||
column: 7
|
||||
end_location:
|
||||
row: 133
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 130
|
||||
column: 7
|
||||
end_location:
|
||||
row: 133
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 25
|
||||
fix:
|
||||
patch:
|
||||
content: self.assertEqual
|
||||
location:
|
||||
row: 6
|
||||
column: 8
|
||||
end_location:
|
||||
row: 6
|
||||
column: 25
|
||||
content: self.assertEqual
|
||||
location:
|
||||
row: 6
|
||||
column: 8
|
||||
end_location:
|
||||
row: 6
|
||||
column: 25
|
||||
- kind:
|
||||
DeprecatedUnittestAlias:
|
||||
- assertEquals
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 7
|
||||
column: 25
|
||||
fix:
|
||||
patch:
|
||||
content: self.assertEqual
|
||||
location:
|
||||
row: 7
|
||||
column: 8
|
||||
end_location:
|
||||
row: 7
|
||||
column: 25
|
||||
content: self.assertEqual
|
||||
location:
|
||||
row: 7
|
||||
column: 8
|
||||
end_location:
|
||||
row: 7
|
||||
column: 25
|
||||
- kind:
|
||||
DeprecatedUnittestAlias:
|
||||
- failUnlessAlmostEqual
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 9
|
||||
column: 34
|
||||
fix:
|
||||
patch:
|
||||
content: self.assertAlmostEqual
|
||||
location:
|
||||
row: 9
|
||||
column: 8
|
||||
end_location:
|
||||
row: 9
|
||||
column: 34
|
||||
content: self.assertAlmostEqual
|
||||
location:
|
||||
row: 9
|
||||
column: 8
|
||||
end_location:
|
||||
row: 9
|
||||
column: 34
|
||||
- kind:
|
||||
DeprecatedUnittestAlias:
|
||||
- assertNotRegexpMatches
|
||||
|
@ -70,12 +67,11 @@ expression: checks
|
|||
row: 10
|
||||
column: 35
|
||||
fix:
|
||||
patch:
|
||||
content: self.assertNotRegex
|
||||
location:
|
||||
row: 10
|
||||
column: 8
|
||||
end_location:
|
||||
row: 10
|
||||
column: 35
|
||||
content: self.assertNotRegex
|
||||
location:
|
||||
row: 10
|
||||
column: 8
|
||||
end_location:
|
||||
row: 10
|
||||
column: 35
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 4
|
||||
column: 9
|
||||
end_location:
|
||||
row: 4
|
||||
column: 20
|
||||
content: list
|
||||
location:
|
||||
row: 4
|
||||
column: 9
|
||||
end_location:
|
||||
row: 4
|
||||
column: 20
|
||||
- kind:
|
||||
UsePEP585Annotation: List
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 13
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 11
|
||||
column: 9
|
||||
end_location:
|
||||
row: 11
|
||||
column: 13
|
||||
content: list
|
||||
location:
|
||||
row: 11
|
||||
column: 9
|
||||
end_location:
|
||||
row: 11
|
||||
column: 13
|
||||
- kind:
|
||||
UsePEP585Annotation: List
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 18
|
||||
column: 9
|
||||
end_location:
|
||||
row: 18
|
||||
column: 15
|
||||
content: list
|
||||
location:
|
||||
row: 18
|
||||
column: 9
|
||||
end_location:
|
||||
row: 18
|
||||
column: 15
|
||||
- kind:
|
||||
UsePEP585Annotation: List
|
||||
location:
|
||||
|
@ -62,12 +59,11 @@ expression: checks
|
|||
row: 25
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 25
|
||||
column: 9
|
||||
end_location:
|
||||
row: 25
|
||||
column: 14
|
||||
content: list
|
||||
location:
|
||||
row: 25
|
||||
column: 9
|
||||
end_location:
|
||||
row: 25
|
||||
column: 14
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: str | None
|
||||
location:
|
||||
row: 6
|
||||
column: 9
|
||||
end_location:
|
||||
row: 6
|
||||
column: 22
|
||||
content: str | None
|
||||
location:
|
||||
row: 6
|
||||
column: 9
|
||||
end_location:
|
||||
row: 6
|
||||
column: 22
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 10
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 10
|
||||
column: 29
|
||||
fix:
|
||||
patch:
|
||||
content: str | None
|
||||
location:
|
||||
row: 10
|
||||
column: 9
|
||||
end_location:
|
||||
row: 10
|
||||
column: 29
|
||||
content: str | None
|
||||
location:
|
||||
row: 10
|
||||
column: 9
|
||||
end_location:
|
||||
row: 10
|
||||
column: 29
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 14
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 45
|
||||
fix:
|
||||
patch:
|
||||
content: "str | int | Union[float, bytes]"
|
||||
location:
|
||||
row: 14
|
||||
column: 9
|
||||
end_location:
|
||||
row: 14
|
||||
column: 45
|
||||
content: "str | int | Union[float, bytes]"
|
||||
location:
|
||||
row: 14
|
||||
column: 9
|
||||
end_location:
|
||||
row: 14
|
||||
column: 45
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 14
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 44
|
||||
fix:
|
||||
patch:
|
||||
content: float | bytes
|
||||
location:
|
||||
row: 14
|
||||
column: 25
|
||||
end_location:
|
||||
row: 14
|
||||
column: 44
|
||||
content: float | bytes
|
||||
location:
|
||||
row: 14
|
||||
column: 25
|
||||
end_location:
|
||||
row: 14
|
||||
column: 44
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 18
|
||||
|
@ -74,14 +70,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 31
|
||||
fix:
|
||||
patch:
|
||||
content: str | int
|
||||
location:
|
||||
row: 18
|
||||
column: 9
|
||||
end_location:
|
||||
row: 18
|
||||
column: 31
|
||||
content: str | int
|
||||
location:
|
||||
row: 18
|
||||
column: 9
|
||||
end_location:
|
||||
row: 18
|
||||
column: 31
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 22
|
||||
|
@ -90,14 +85,13 @@ expression: checks
|
|||
row: 22
|
||||
column: 33
|
||||
fix:
|
||||
patch:
|
||||
content: str | int
|
||||
location:
|
||||
row: 22
|
||||
column: 9
|
||||
end_location:
|
||||
row: 22
|
||||
column: 33
|
||||
content: str | int
|
||||
location:
|
||||
row: 22
|
||||
column: 9
|
||||
end_location:
|
||||
row: 22
|
||||
column: 33
|
||||
- kind: UsePEP604Annotation
|
||||
location:
|
||||
row: 26
|
||||
|
@ -106,12 +100,11 @@ expression: checks
|
|||
row: 26
|
||||
column: 40
|
||||
fix:
|
||||
patch:
|
||||
content: "(str, int) | float"
|
||||
location:
|
||||
row: 26
|
||||
column: 9
|
||||
end_location:
|
||||
row: 26
|
||||
column: 40
|
||||
content: "(str, int) | float"
|
||||
location:
|
||||
row: 26
|
||||
column: 9
|
||||
end_location:
|
||||
row: 26
|
||||
column: 40
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 35
|
||||
fix:
|
||||
patch:
|
||||
content: super()
|
||||
location:
|
||||
row: 17
|
||||
column: 17
|
||||
end_location:
|
||||
row: 17
|
||||
column: 35
|
||||
content: super()
|
||||
location:
|
||||
row: 17
|
||||
column: 17
|
||||
end_location:
|
||||
row: 17
|
||||
column: 35
|
||||
- kind: SuperCallWithParameters
|
||||
location:
|
||||
row: 18
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 26
|
||||
fix:
|
||||
patch:
|
||||
content: super()
|
||||
location:
|
||||
row: 18
|
||||
column: 8
|
||||
end_location:
|
||||
row: 18
|
||||
column: 26
|
||||
content: super()
|
||||
location:
|
||||
row: 18
|
||||
column: 8
|
||||
end_location:
|
||||
row: 18
|
||||
column: 26
|
||||
- kind: SuperCallWithParameters
|
||||
location:
|
||||
row: 19
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 22
|
||||
column: 9
|
||||
fix:
|
||||
patch:
|
||||
content: super()
|
||||
location:
|
||||
row: 19
|
||||
column: 8
|
||||
end_location:
|
||||
row: 22
|
||||
column: 9
|
||||
content: super()
|
||||
location:
|
||||
row: 19
|
||||
column: 8
|
||||
end_location:
|
||||
row: 22
|
||||
column: 9
|
||||
- kind: SuperCallWithParameters
|
||||
location:
|
||||
row: 36
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 36
|
||||
column: 28
|
||||
fix:
|
||||
patch:
|
||||
content: super()
|
||||
location:
|
||||
row: 36
|
||||
column: 8
|
||||
end_location:
|
||||
row: 36
|
||||
column: 28
|
||||
content: super()
|
||||
location:
|
||||
row: 36
|
||||
column: 8
|
||||
end_location:
|
||||
row: 36
|
||||
column: 28
|
||||
- kind: SuperCallWithParameters
|
||||
location:
|
||||
row: 50
|
||||
|
@ -74,12 +70,11 @@ expression: checks
|
|||
row: 50
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: super()
|
||||
location:
|
||||
row: 50
|
||||
column: 12
|
||||
end_location:
|
||||
row: 50
|
||||
column: 32
|
||||
content: super()
|
||||
location:
|
||||
row: 50
|
||||
column: 12
|
||||
end_location:
|
||||
row: 50
|
||||
column: 32
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 2
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 3
|
||||
column: 0
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
|
||||
|
|
|
@ -13,14 +13,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 48
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- unicode_literals
|
||||
|
@ -32,14 +31,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 55
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- absolute_import
|
||||
|
@ -51,14 +49,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 48
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generator_stop
|
||||
|
@ -69,14 +66,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 37
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generator_stop
|
||||
|
@ -88,14 +84,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 53
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generators
|
||||
|
@ -106,14 +101,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 49
|
||||
fix:
|
||||
patch:
|
||||
content: from __future__ import invalid_module
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 49
|
||||
content: from __future__ import invalid_module
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 49
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generator_stop
|
||||
|
@ -124,14 +118,13 @@ expression: checks
|
|||
row: 9
|
||||
column: 41
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 9
|
||||
column: 0
|
||||
end_location:
|
||||
row: 10
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 9
|
||||
column: 0
|
||||
end_location:
|
||||
row: 10
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generators
|
||||
|
@ -142,14 +135,13 @@ expression: checks
|
|||
row: 10
|
||||
column: 37
|
||||
fix:
|
||||
patch:
|
||||
content: pass
|
||||
location:
|
||||
row: 10
|
||||
column: 4
|
||||
end_location:
|
||||
row: 10
|
||||
column: 37
|
||||
content: pass
|
||||
location:
|
||||
row: 10
|
||||
column: 4
|
||||
end_location:
|
||||
row: 10
|
||||
column: 37
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generator_stop
|
||||
|
@ -160,14 +152,13 @@ expression: checks
|
|||
row: 13
|
||||
column: 41
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 13
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 0
|
||||
content: ""
|
||||
location:
|
||||
row: 13
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 0
|
||||
- kind:
|
||||
UnnecessaryFutureImport:
|
||||
- generators
|
||||
|
@ -178,12 +169,11 @@ expression: checks
|
|||
row: 14
|
||||
column: 53
|
||||
fix:
|
||||
patch:
|
||||
content: from __future__ import invalid_module
|
||||
location:
|
||||
row: 14
|
||||
column: 4
|
||||
end_location:
|
||||
row: 14
|
||||
column: 53
|
||||
content: from __future__ import invalid_module
|
||||
location:
|
||||
row: 14
|
||||
column: 4
|
||||
end_location:
|
||||
row: 14
|
||||
column: 53
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 10
|
||||
end_location:
|
||||
row: 5
|
||||
column: 12
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 10
|
||||
end_location:
|
||||
row: 5
|
||||
column: 12
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 11
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 11
|
||||
column: 20
|
||||
end_location:
|
||||
row: 11
|
||||
column: 22
|
||||
content: ""
|
||||
location:
|
||||
row: 11
|
||||
column: 20
|
||||
end_location:
|
||||
row: 11
|
||||
column: 22
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 16
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 16
|
||||
column: 24
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 16
|
||||
column: 10
|
||||
end_location:
|
||||
row: 16
|
||||
column: 24
|
||||
content: ""
|
||||
location:
|
||||
row: 16
|
||||
column: 10
|
||||
end_location:
|
||||
row: 16
|
||||
column: 24
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 21
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 21
|
||||
column: 34
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 21
|
||||
column: 20
|
||||
end_location:
|
||||
row: 21
|
||||
column: 34
|
||||
content: ""
|
||||
location:
|
||||
row: 21
|
||||
column: 20
|
||||
end_location:
|
||||
row: 21
|
||||
column: 34
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 27
|
||||
|
@ -74,14 +70,13 @@ expression: checks
|
|||
row: 28
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 27
|
||||
column: 10
|
||||
end_location:
|
||||
row: 28
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 27
|
||||
column: 10
|
||||
end_location:
|
||||
row: 28
|
||||
column: 1
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 33
|
||||
|
@ -90,14 +85,13 @@ expression: checks
|
|||
row: 35
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 33
|
||||
column: 10
|
||||
end_location:
|
||||
row: 35
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 33
|
||||
column: 10
|
||||
end_location:
|
||||
row: 35
|
||||
column: 1
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 40
|
||||
|
@ -106,14 +100,13 @@ expression: checks
|
|||
row: 42
|
||||
column: 19
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 40
|
||||
column: 20
|
||||
end_location:
|
||||
row: 42
|
||||
column: 19
|
||||
content: ""
|
||||
location:
|
||||
row: 40
|
||||
column: 20
|
||||
end_location:
|
||||
row: 42
|
||||
column: 19
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 47
|
||||
|
@ -122,14 +115,13 @@ expression: checks
|
|||
row: 51
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 47
|
||||
column: 20
|
||||
end_location:
|
||||
row: 51
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 47
|
||||
column: 20
|
||||
end_location:
|
||||
row: 51
|
||||
column: 1
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 56
|
||||
|
@ -138,14 +130,13 @@ expression: checks
|
|||
row: 62
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 56
|
||||
column: 20
|
||||
end_location:
|
||||
row: 62
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 56
|
||||
column: 20
|
||||
end_location:
|
||||
row: 62
|
||||
column: 1
|
||||
- kind: UnnecessaryLRUCacheParams
|
||||
location:
|
||||
row: 67
|
||||
|
@ -154,12 +145,11 @@ expression: checks
|
|||
row: 72
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 67
|
||||
column: 20
|
||||
end_location:
|
||||
row: 72
|
||||
column: 1
|
||||
content: ""
|
||||
location:
|
||||
row: 67
|
||||
column: 20
|
||||
end_location:
|
||||
row: 72
|
||||
column: 1
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 21
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 2
|
||||
column: 0
|
||||
end_location:
|
||||
row: 2
|
||||
column: 21
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 3
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 18
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 3
|
||||
column: 0
|
||||
end_location:
|
||||
row: 3
|
||||
column: 18
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 4
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 14
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 14
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 4
|
||||
column: 0
|
||||
end_location:
|
||||
row: 4
|
||||
column: 14
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 5
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 20
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 20
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 6
|
||||
|
@ -74,14 +70,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 22
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 6
|
||||
column: 0
|
||||
end_location:
|
||||
row: 6
|
||||
column: 22
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 7
|
||||
|
@ -90,14 +85,13 @@ expression: checks
|
|||
row: 7
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 30
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 7
|
||||
column: 0
|
||||
end_location:
|
||||
row: 7
|
||||
column: 30
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 8
|
||||
|
@ -106,14 +100,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"\"\"\nLorem\n\nIpsum\n\"\"\""
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 1
|
||||
content: "b\"\"\"\nLorem\n\nIpsum\n\"\"\""
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 1
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 26
|
||||
|
@ -122,14 +115,13 @@ expression: checks
|
|||
row: 26
|
||||
column: 27
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 26
|
||||
column: 19
|
||||
end_location:
|
||||
row: 26
|
||||
column: 26
|
||||
content: ""
|
||||
location:
|
||||
row: 26
|
||||
column: 19
|
||||
end_location:
|
||||
row: 26
|
||||
column: 26
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 44
|
||||
|
@ -138,14 +130,13 @@ expression: checks
|
|||
row: 44
|
||||
column: 31
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 44
|
||||
column: 23
|
||||
end_location:
|
||||
row: 44
|
||||
column: 30
|
||||
content: ""
|
||||
location:
|
||||
row: 44
|
||||
column: 23
|
||||
end_location:
|
||||
row: 44
|
||||
column: 30
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 46
|
||||
|
@ -154,14 +145,13 @@ expression: checks
|
|||
row: 46
|
||||
column: 39
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 46
|
||||
column: 23
|
||||
end_location:
|
||||
row: 46
|
||||
column: 38
|
||||
content: ""
|
||||
location:
|
||||
row: 46
|
||||
column: 23
|
||||
end_location:
|
||||
row: 46
|
||||
column: 38
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 48
|
||||
|
@ -170,14 +160,13 @@ expression: checks
|
|||
row: 48
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: "br\"fo\\o\""
|
||||
location:
|
||||
row: 48
|
||||
column: 0
|
||||
end_location:
|
||||
row: 48
|
||||
column: 23
|
||||
content: "br\"fo\\o\""
|
||||
location:
|
||||
row: 48
|
||||
column: 0
|
||||
end_location:
|
||||
row: 48
|
||||
column: 23
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 49
|
||||
|
@ -186,14 +175,13 @@ expression: checks
|
|||
row: 49
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 49
|
||||
column: 0
|
||||
end_location:
|
||||
row: 49
|
||||
column: 22
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 49
|
||||
column: 0
|
||||
end_location:
|
||||
row: 49
|
||||
column: 22
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 50
|
||||
|
@ -202,14 +190,13 @@ expression: checks
|
|||
row: 50
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: "bR\"fo\\o\""
|
||||
location:
|
||||
row: 50
|
||||
column: 0
|
||||
end_location:
|
||||
row: 50
|
||||
column: 23
|
||||
content: "bR\"fo\\o\""
|
||||
location:
|
||||
row: 50
|
||||
column: 0
|
||||
end_location:
|
||||
row: 50
|
||||
column: 23
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 51
|
||||
|
@ -218,14 +205,13 @@ expression: checks
|
|||
row: 51
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 51
|
||||
column: 0
|
||||
end_location:
|
||||
row: 51
|
||||
column: 22
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 51
|
||||
column: 0
|
||||
end_location:
|
||||
row: 51
|
||||
column: 22
|
||||
- kind: UnnecessaryEncodeUTF8
|
||||
location:
|
||||
row: 52
|
||||
|
@ -234,12 +220,11 @@ expression: checks
|
|||
row: 52
|
||||
column: 20
|
||||
fix:
|
||||
patch:
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 52
|
||||
column: 6
|
||||
end_location:
|
||||
row: 52
|
||||
column: 20
|
||||
content: "b\"foo\""
|
||||
location:
|
||||
row: 52
|
||||
column: 6
|
||||
end_location:
|
||||
row: 52
|
||||
column: 20
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 52
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType1(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 52
|
||||
content: "class MyType1(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 52
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType2
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 50
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType2(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 50
|
||||
content: "class MyType2(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 8
|
||||
column: 50
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType3
|
||||
location:
|
||||
|
@ -45,14 +43,13 @@ expression: checks
|
|||
row: 11
|
||||
column: 44
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType3(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 11
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 44
|
||||
content: "class MyType3(TypedDict):\n a: int\n b: str"
|
||||
location:
|
||||
row: 11
|
||||
column: 0
|
||||
end_location:
|
||||
row: 11
|
||||
column: 44
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType4
|
||||
location:
|
||||
|
@ -62,14 +59,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 30
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType4(TypedDict):\n pass"
|
||||
location:
|
||||
row: 14
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 30
|
||||
content: "class MyType4(TypedDict):\n pass"
|
||||
location:
|
||||
row: 14
|
||||
column: 0
|
||||
end_location:
|
||||
row: 14
|
||||
column: 30
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType5
|
||||
location:
|
||||
|
@ -79,14 +75,13 @@ expression: checks
|
|||
row: 17
|
||||
column: 46
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType5(TypedDict):\n a: 'hello'"
|
||||
location:
|
||||
row: 17
|
||||
column: 0
|
||||
end_location:
|
||||
row: 17
|
||||
column: 46
|
||||
content: "class MyType5(TypedDict):\n a: 'hello'"
|
||||
location:
|
||||
row: 17
|
||||
column: 0
|
||||
end_location:
|
||||
row: 17
|
||||
column: 46
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType6
|
||||
location:
|
||||
|
@ -96,14 +91,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 41
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType6(TypedDict):\n a: 'hello'"
|
||||
location:
|
||||
row: 18
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 41
|
||||
content: "class MyType6(TypedDict):\n a: 'hello'"
|
||||
location:
|
||||
row: 18
|
||||
column: 0
|
||||
end_location:
|
||||
row: 18
|
||||
column: 41
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType7
|
||||
location:
|
||||
|
@ -113,14 +107,13 @@ expression: checks
|
|||
row: 21
|
||||
column: 56
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType7(TypedDict):\n a: NotRequired[dict]"
|
||||
location:
|
||||
row: 21
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 56
|
||||
content: "class MyType7(TypedDict):\n a: NotRequired[dict]"
|
||||
location:
|
||||
row: 21
|
||||
column: 0
|
||||
end_location:
|
||||
row: 21
|
||||
column: 56
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType8
|
||||
location:
|
||||
|
@ -130,14 +123,13 @@ expression: checks
|
|||
row: 24
|
||||
column: 65
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType8(TypedDict, total=False):\n x: int\n y: int"
|
||||
location:
|
||||
row: 24
|
||||
column: 0
|
||||
end_location:
|
||||
row: 24
|
||||
column: 65
|
||||
content: "class MyType8(TypedDict, total=False):\n x: int\n y: int"
|
||||
location:
|
||||
row: 24
|
||||
column: 0
|
||||
end_location:
|
||||
row: 24
|
||||
column: 65
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType10
|
||||
location:
|
||||
|
@ -147,14 +139,13 @@ expression: checks
|
|||
row: 30
|
||||
column: 59
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType10(TypedDict):\n key: Literal['value']"
|
||||
location:
|
||||
row: 30
|
||||
column: 0
|
||||
end_location:
|
||||
row: 30
|
||||
column: 59
|
||||
content: "class MyType10(TypedDict):\n key: Literal['value']"
|
||||
location:
|
||||
row: 30
|
||||
column: 0
|
||||
end_location:
|
||||
row: 30
|
||||
column: 59
|
||||
- kind:
|
||||
ConvertTypedDictFunctionalToClass: MyType11
|
||||
location:
|
||||
|
@ -164,12 +155,11 @@ expression: checks
|
|||
row: 33
|
||||
column: 53
|
||||
fix:
|
||||
patch:
|
||||
content: "class MyType11(typing.TypedDict):\n key: int"
|
||||
location:
|
||||
row: 33
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 53
|
||||
content: "class MyType11(typing.TypedDict):\n key: int"
|
||||
location:
|
||||
row: 33
|
||||
column: 0
|
||||
end_location:
|
||||
row: 33
|
||||
column: 53
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 61
|
||||
fix:
|
||||
patch:
|
||||
content: "class NT1(NamedTuple):\n a: int\n b: tuple[str, ...]"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 61
|
||||
content: "class NT1(NamedTuple):\n a: int\n b: tuple[str, ...]"
|
||||
location:
|
||||
row: 5
|
||||
column: 0
|
||||
end_location:
|
||||
row: 5
|
||||
column: 61
|
||||
- kind:
|
||||
ConvertNamedTupleFunctionalToClass: NT2
|
||||
location:
|
||||
|
@ -28,14 +27,13 @@ expression: checks
|
|||
row: 12
|
||||
column: 1
|
||||
fix:
|
||||
patch:
|
||||
content: "class NT2(NamedTuple):\n a: int\n b: str = 'foo'\n c: list[bool] = [True]"
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 12
|
||||
column: 1
|
||||
content: "class NT2(NamedTuple):\n a: int\n b: str = 'foo'\n c: list[bool] = [True]"
|
||||
location:
|
||||
row: 8
|
||||
column: 0
|
||||
end_location:
|
||||
row: 12
|
||||
column: 1
|
||||
- kind:
|
||||
ConvertNamedTupleFunctionalToClass: NT3
|
||||
location:
|
||||
|
@ -45,12 +43,11 @@ expression: checks
|
|||
row: 15
|
||||
column: 56
|
||||
fix:
|
||||
patch:
|
||||
content: "class NT3(typing.NamedTuple):\n a: int\n b: str"
|
||||
location:
|
||||
row: 15
|
||||
column: 0
|
||||
end_location:
|
||||
row: 15
|
||||
column: 56
|
||||
content: "class NT3(typing.NamedTuple):\n a: int\n b: str"
|
||||
location:
|
||||
row: 15
|
||||
column: 0
|
||||
end_location:
|
||||
row: 15
|
||||
column: 56
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ expression: checks
|
|||
row: 1
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 10
|
||||
end_location:
|
||||
row: 1
|
||||
column: 15
|
||||
content: ""
|
||||
location:
|
||||
row: 1
|
||||
column: 10
|
||||
end_location:
|
||||
row: 1
|
||||
column: 15
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 2
|
||||
|
@ -26,14 +25,13 @@ expression: checks
|
|||
row: 2
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 10
|
||||
end_location:
|
||||
row: 2
|
||||
column: 16
|
||||
content: ""
|
||||
location:
|
||||
row: 2
|
||||
column: 10
|
||||
end_location:
|
||||
row: 2
|
||||
column: 16
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 3
|
||||
|
@ -42,14 +40,13 @@ expression: checks
|
|||
row: 3
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 3
|
||||
column: 12
|
||||
end_location:
|
||||
row: 3
|
||||
column: 16
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 3
|
||||
column: 12
|
||||
end_location:
|
||||
row: 3
|
||||
column: 16
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 4
|
||||
|
@ -58,14 +55,13 @@ expression: checks
|
|||
row: 4
|
||||
column: 18
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 4
|
||||
column: 12
|
||||
end_location:
|
||||
row: 4
|
||||
column: 17
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 4
|
||||
column: 12
|
||||
end_location:
|
||||
row: 4
|
||||
column: 17
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 5
|
||||
|
@ -74,14 +70,13 @@ expression: checks
|
|||
row: 5
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 10
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
content: ""
|
||||
location:
|
||||
row: 5
|
||||
column: 10
|
||||
end_location:
|
||||
row: 5
|
||||
column: 15
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 6
|
||||
|
@ -90,14 +85,13 @@ expression: checks
|
|||
row: 6
|
||||
column: 17
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 6
|
||||
column: 10
|
||||
end_location:
|
||||
row: 6
|
||||
column: 16
|
||||
content: ""
|
||||
location:
|
||||
row: 6
|
||||
column: 10
|
||||
end_location:
|
||||
row: 6
|
||||
column: 16
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 7
|
||||
|
@ -106,14 +100,13 @@ expression: checks
|
|||
row: 7
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 7
|
||||
column: 8
|
||||
end_location:
|
||||
row: 7
|
||||
column: 13
|
||||
content: ""
|
||||
location:
|
||||
row: 7
|
||||
column: 8
|
||||
end_location:
|
||||
row: 7
|
||||
column: 13
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 8
|
||||
|
@ -122,14 +115,13 @@ expression: checks
|
|||
row: 8
|
||||
column: 15
|
||||
fix:
|
||||
patch:
|
||||
content: "\"w\""
|
||||
location:
|
||||
row: 8
|
||||
column: 10
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
content: "\"w\""
|
||||
location:
|
||||
row: 8
|
||||
column: 10
|
||||
end_location:
|
||||
row: 8
|
||||
column: 14
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 10
|
||||
|
@ -138,14 +130,13 @@ expression: checks
|
|||
row: 10
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 10
|
||||
column: 15
|
||||
end_location:
|
||||
row: 10
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 10
|
||||
column: 15
|
||||
end_location:
|
||||
row: 10
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 12
|
||||
|
@ -154,14 +145,13 @@ expression: checks
|
|||
row: 12
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 15
|
||||
end_location:
|
||||
row: 12
|
||||
column: 21
|
||||
content: ""
|
||||
location:
|
||||
row: 12
|
||||
column: 15
|
||||
end_location:
|
||||
row: 12
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 14
|
||||
|
@ -170,14 +160,13 @@ expression: checks
|
|||
row: 14
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 14
|
||||
column: 17
|
||||
end_location:
|
||||
row: 14
|
||||
column: 21
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 14
|
||||
column: 17
|
||||
end_location:
|
||||
row: 14
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 16
|
||||
|
@ -186,14 +175,13 @@ expression: checks
|
|||
row: 16
|
||||
column: 23
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 16
|
||||
column: 17
|
||||
end_location:
|
||||
row: 16
|
||||
column: 22
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 16
|
||||
column: 17
|
||||
end_location:
|
||||
row: 16
|
||||
column: 22
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 18
|
||||
|
@ -202,14 +190,13 @@ expression: checks
|
|||
row: 18
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 18
|
||||
column: 15
|
||||
end_location:
|
||||
row: 18
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 18
|
||||
column: 15
|
||||
end_location:
|
||||
row: 18
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 20
|
||||
|
@ -218,14 +205,13 @@ expression: checks
|
|||
row: 20
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 20
|
||||
column: 15
|
||||
end_location:
|
||||
row: 20
|
||||
column: 21
|
||||
content: ""
|
||||
location:
|
||||
row: 20
|
||||
column: 15
|
||||
end_location:
|
||||
row: 20
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 22
|
||||
|
@ -234,14 +220,13 @@ expression: checks
|
|||
row: 22
|
||||
column: 39
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 22
|
||||
column: 15
|
||||
end_location:
|
||||
row: 22
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 22
|
||||
column: 15
|
||||
end_location:
|
||||
row: 22
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 24
|
||||
|
@ -250,14 +235,13 @@ expression: checks
|
|||
row: 24
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "\"w\""
|
||||
location:
|
||||
row: 24
|
||||
column: 17
|
||||
end_location:
|
||||
row: 24
|
||||
column: 21
|
||||
content: "\"w\""
|
||||
location:
|
||||
row: 24
|
||||
column: 17
|
||||
end_location:
|
||||
row: 24
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 27
|
||||
|
@ -266,14 +250,13 @@ expression: checks
|
|||
row: 27
|
||||
column: 27
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 27
|
||||
column: 21
|
||||
end_location:
|
||||
row: 27
|
||||
column: 26
|
||||
content: ""
|
||||
location:
|
||||
row: 27
|
||||
column: 21
|
||||
end_location:
|
||||
row: 27
|
||||
column: 26
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 28
|
||||
|
@ -282,14 +265,13 @@ expression: checks
|
|||
row: 28
|
||||
column: 28
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 28
|
||||
column: 23
|
||||
end_location:
|
||||
row: 28
|
||||
column: 27
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 28
|
||||
column: 23
|
||||
end_location:
|
||||
row: 28
|
||||
column: 27
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 30
|
||||
|
@ -298,14 +280,13 @@ expression: checks
|
|||
row: 30
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 30
|
||||
column: 26
|
||||
end_location:
|
||||
row: 30
|
||||
column: 31
|
||||
content: ""
|
||||
location:
|
||||
row: 30
|
||||
column: 26
|
||||
end_location:
|
||||
row: 30
|
||||
column: 31
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 32
|
||||
|
@ -314,14 +295,13 @@ expression: checks
|
|||
row: 32
|
||||
column: 33
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 32
|
||||
column: 28
|
||||
end_location:
|
||||
row: 32
|
||||
column: 32
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 32
|
||||
column: 28
|
||||
end_location:
|
||||
row: 32
|
||||
column: 32
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 35
|
||||
|
@ -330,14 +310,13 @@ expression: checks
|
|||
row: 35
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 35
|
||||
column: 15
|
||||
end_location:
|
||||
row: 35
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 35
|
||||
column: 15
|
||||
end_location:
|
||||
row: 35
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 35
|
||||
|
@ -346,14 +325,13 @@ expression: checks
|
|||
row: 35
|
||||
column: 45
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 35
|
||||
column: 39
|
||||
end_location:
|
||||
row: 35
|
||||
column: 44
|
||||
content: ""
|
||||
location:
|
||||
row: 35
|
||||
column: 39
|
||||
end_location:
|
||||
row: 35
|
||||
column: 44
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 37
|
||||
|
@ -362,14 +340,13 @@ expression: checks
|
|||
row: 37
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 37
|
||||
column: 17
|
||||
end_location:
|
||||
row: 37
|
||||
column: 21
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 37
|
||||
column: 17
|
||||
end_location:
|
||||
row: 37
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 37
|
||||
|
@ -378,14 +355,13 @@ expression: checks
|
|||
row: 37
|
||||
column: 47
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 37
|
||||
column: 42
|
||||
end_location:
|
||||
row: 37
|
||||
column: 46
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 37
|
||||
column: 42
|
||||
end_location:
|
||||
row: 37
|
||||
column: 46
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 40
|
||||
|
@ -394,14 +370,13 @@ expression: checks
|
|||
row: 40
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 40
|
||||
column: 10
|
||||
end_location:
|
||||
row: 40
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 40
|
||||
column: 10
|
||||
end_location:
|
||||
row: 40
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 41
|
||||
|
@ -410,14 +385,13 @@ expression: checks
|
|||
row: 41
|
||||
column: 26
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 41
|
||||
column: 15
|
||||
end_location:
|
||||
row: 41
|
||||
column: 25
|
||||
content: ""
|
||||
location:
|
||||
row: 41
|
||||
column: 15
|
||||
end_location:
|
||||
row: 41
|
||||
column: 25
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 42
|
||||
|
@ -426,14 +400,13 @@ expression: checks
|
|||
row: 42
|
||||
column: 26
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 42
|
||||
column: 5
|
||||
end_location:
|
||||
row: 42
|
||||
column: 15
|
||||
content: ""
|
||||
location:
|
||||
row: 42
|
||||
column: 5
|
||||
end_location:
|
||||
row: 42
|
||||
column: 15
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 44
|
||||
|
@ -442,14 +415,13 @@ expression: checks
|
|||
row: 44
|
||||
column: 26
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 44
|
||||
column: 15
|
||||
end_location:
|
||||
row: 44
|
||||
column: 25
|
||||
content: ""
|
||||
location:
|
||||
row: 44
|
||||
column: 15
|
||||
end_location:
|
||||
row: 44
|
||||
column: 25
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 46
|
||||
|
@ -458,14 +430,13 @@ expression: checks
|
|||
row: 46
|
||||
column: 31
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 46
|
||||
column: 20
|
||||
end_location:
|
||||
row: 46
|
||||
column: 30
|
||||
content: ""
|
||||
location:
|
||||
row: 46
|
||||
column: 20
|
||||
end_location:
|
||||
row: 46
|
||||
column: 30
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 48
|
||||
|
@ -474,14 +445,13 @@ expression: checks
|
|||
row: 48
|
||||
column: 31
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 48
|
||||
column: 10
|
||||
end_location:
|
||||
row: 48
|
||||
column: 20
|
||||
content: ""
|
||||
location:
|
||||
row: 48
|
||||
column: 10
|
||||
end_location:
|
||||
row: 48
|
||||
column: 20
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 51
|
||||
|
@ -490,14 +460,13 @@ expression: checks
|
|||
row: 51
|
||||
column: 22
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 51
|
||||
column: 17
|
||||
end_location:
|
||||
row: 51
|
||||
column: 21
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 51
|
||||
column: 17
|
||||
end_location:
|
||||
row: 51
|
||||
column: 21
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 52
|
||||
|
@ -506,14 +475,13 @@ expression: checks
|
|||
row: 52
|
||||
column: 27
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 52
|
||||
column: 22
|
||||
end_location:
|
||||
row: 52
|
||||
column: 26
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 52
|
||||
column: 22
|
||||
end_location:
|
||||
row: 52
|
||||
column: 26
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 53
|
||||
|
@ -522,14 +490,13 @@ expression: checks
|
|||
row: 53
|
||||
column: 27
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 53
|
||||
column: 10
|
||||
end_location:
|
||||
row: 53
|
||||
column: 14
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 53
|
||||
column: 10
|
||||
end_location:
|
||||
row: 53
|
||||
column: 14
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 55
|
||||
|
@ -538,14 +505,13 @@ expression: checks
|
|||
row: 55
|
||||
column: 27
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 55
|
||||
column: 22
|
||||
end_location:
|
||||
row: 55
|
||||
column: 26
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 55
|
||||
column: 22
|
||||
end_location:
|
||||
row: 55
|
||||
column: 26
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 57
|
||||
|
@ -554,14 +520,13 @@ expression: checks
|
|||
row: 57
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 57
|
||||
column: 27
|
||||
end_location:
|
||||
row: 57
|
||||
column: 31
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 57
|
||||
column: 27
|
||||
end_location:
|
||||
row: 57
|
||||
column: 31
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 59
|
||||
|
@ -570,14 +535,13 @@ expression: checks
|
|||
row: 59
|
||||
column: 32
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 59
|
||||
column: 15
|
||||
end_location:
|
||||
row: 59
|
||||
column: 19
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 59
|
||||
column: 15
|
||||
end_location:
|
||||
row: 59
|
||||
column: 19
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 62
|
||||
|
@ -586,14 +550,13 @@ expression: checks
|
|||
row: 62
|
||||
column: 110
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 62
|
||||
column: 15
|
||||
end_location:
|
||||
row: 62
|
||||
column: 25
|
||||
content: ""
|
||||
location:
|
||||
row: 62
|
||||
column: 15
|
||||
end_location:
|
||||
row: 62
|
||||
column: 25
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 63
|
||||
|
@ -602,14 +565,13 @@ expression: checks
|
|||
row: 63
|
||||
column: 110
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 63
|
||||
column: 99
|
||||
end_location:
|
||||
row: 63
|
||||
column: 109
|
||||
content: ""
|
||||
location:
|
||||
row: 63
|
||||
column: 99
|
||||
end_location:
|
||||
row: 63
|
||||
column: 109
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 64
|
||||
|
@ -618,14 +580,13 @@ expression: checks
|
|||
row: 64
|
||||
column: 110
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 64
|
||||
column: 58
|
||||
end_location:
|
||||
row: 64
|
||||
column: 68
|
||||
content: ""
|
||||
location:
|
||||
row: 64
|
||||
column: 58
|
||||
end_location:
|
||||
row: 64
|
||||
column: 68
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 65
|
||||
|
@ -634,14 +595,13 @@ expression: checks
|
|||
row: 65
|
||||
column: 110
|
||||
fix:
|
||||
patch:
|
||||
content: ""
|
||||
location:
|
||||
row: 65
|
||||
column: 5
|
||||
end_location:
|
||||
row: 65
|
||||
column: 15
|
||||
content: ""
|
||||
location:
|
||||
row: 65
|
||||
column: 5
|
||||
end_location:
|
||||
row: 65
|
||||
column: 15
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 67
|
||||
|
@ -650,14 +610,13 @@ expression: checks
|
|||
row: 67
|
||||
column: 111
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 67
|
||||
column: 22
|
||||
end_location:
|
||||
row: 67
|
||||
column: 26
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 67
|
||||
column: 22
|
||||
end_location:
|
||||
row: 67
|
||||
column: 26
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 68
|
||||
|
@ -666,14 +625,13 @@ expression: checks
|
|||
row: 68
|
||||
column: 111
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 68
|
||||
column: 106
|
||||
end_location:
|
||||
row: 68
|
||||
column: 110
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 68
|
||||
column: 106
|
||||
end_location:
|
||||
row: 68
|
||||
column: 110
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 69
|
||||
|
@ -682,14 +640,13 @@ expression: checks
|
|||
row: 69
|
||||
column: 111
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 69
|
||||
column: 65
|
||||
end_location:
|
||||
row: 69
|
||||
column: 69
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 69
|
||||
column: 65
|
||||
end_location:
|
||||
row: 69
|
||||
column: 69
|
||||
- kind: RedundantOpenModes
|
||||
location:
|
||||
row: 70
|
||||
|
@ -698,12 +655,11 @@ expression: checks
|
|||
row: 70
|
||||
column: 111
|
||||
fix:
|
||||
patch:
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 70
|
||||
column: 10
|
||||
end_location:
|
||||
row: 70
|
||||
column: 14
|
||||
content: "\"rb\""
|
||||
location:
|
||||
row: 70
|
||||
column: 10
|
||||
end_location:
|
||||
row: 70
|
||||
column: 14
|
||||
|
||||
|
|
|
@ -11,12 +11,11 @@ expression: checks
|
|||
row: 34
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 34
|
||||
column: 17
|
||||
end_location:
|
||||
row: 34
|
||||
column: 21
|
||||
content: list
|
||||
location:
|
||||
row: 34
|
||||
column: 17
|
||||
end_location:
|
||||
row: 34
|
||||
column: 21
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@ expression: checks
|
|||
row: 34
|
||||
column: 21
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 34
|
||||
column: 17
|
||||
end_location:
|
||||
row: 34
|
||||
column: 21
|
||||
content: list
|
||||
location:
|
||||
row: 34
|
||||
column: 17
|
||||
end_location:
|
||||
row: 34
|
||||
column: 21
|
||||
- kind:
|
||||
UsePEP585Annotation: List
|
||||
location:
|
||||
|
@ -28,12 +27,11 @@ expression: checks
|
|||
row: 35
|
||||
column: 12
|
||||
fix:
|
||||
patch:
|
||||
content: list
|
||||
location:
|
||||
row: 35
|
||||
column: 8
|
||||
end_location:
|
||||
row: 35
|
||||
column: 12
|
||||
content: list
|
||||
location:
|
||||
row: 35
|
||||
column: 8
|
||||
end_location:
|
||||
row: 35
|
||||
column: 12
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 40
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: int | None
|
||||
location:
|
||||
row: 40
|
||||
column: 3
|
||||
end_location:
|
||||
row: 40
|
||||
column: 16
|
||||
content: int | None
|
||||
location:
|
||||
row: 40
|
||||
column: 3
|
||||
end_location:
|
||||
row: 40
|
||||
column: 16
|
||||
|
||||
|
|
|
@ -10,12 +10,11 @@ expression: checks
|
|||
row: 40
|
||||
column: 16
|
||||
fix:
|
||||
patch:
|
||||
content: int | None
|
||||
location:
|
||||
row: 40
|
||||
column: 3
|
||||
end_location:
|
||||
row: 40
|
||||
column: 16
|
||||
content: int | None
|
||||
location:
|
||||
row: 40
|
||||
column: 3
|
||||
end_location:
|
||||
row: 40
|
||||
column: 16
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ expression: checks
|
|||
row: 1
|
||||
column: 6
|
||||
fix:
|
||||
patch:
|
||||
content: B
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 6
|
||||
content: B
|
||||
location:
|
||||
row: 1
|
||||
column: 5
|
||||
end_location:
|
||||
row: 1
|
||||
column: 6
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@ expression: checks
|
|||
row: 5
|
||||
column: 56
|
||||
fix:
|
||||
patch:
|
||||
content: )
|
||||
location:
|
||||
row: 5
|
||||
column: 55
|
||||
end_location:
|
||||
row: 5
|
||||
column: 56
|
||||
content: )
|
||||
location:
|
||||
row: 5
|
||||
column: 55
|
||||
end_location:
|
||||
row: 5
|
||||
column: 56
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue