-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply
infer_kwarg_from_call()
to more checks (#8775)
These mostly solve false negatives for various checks, save for one false positive for `use-maxsplit-arg`.
- Loading branch information
1 parent
bafb229
commit 507dfc5
Showing
10 changed files
with
68 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Apply ``infer_kwarg_from_call()`` to more checks | ||
|
||
These mostly solve false negatives for various checks, | ||
save for one false positive for ``use-maxsplit-arg``. | ||
|
||
Closes #7761 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
use-maxsplit-arg:5:12:5:30::Use '1,2,3'.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:6:11:6:35::"Use '1,2,3'[::-1].split(',', maxsplit=1)[0] instead":UNDEFINED | ||
use-maxsplit-arg:9:12:9:26::Use SEQ.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:10:11:10:25::Use SEQ.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:11:12:11:27::Use SEQ.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:12:11:12:26::Use SEQ.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:45:12:45:36::Use Foo.class_str.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:46:11:46:35::Use Foo.class_str.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:47:12:47:37::Use Foo.class_str.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:48:11:48:36::Use Foo.class_str.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:56:12:56:40::Use test.get_string().split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:57:11:57:39::Use test.get_string().rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:66:10:66:22::Use s.split(' ', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:67:10:67:22::Use s.rsplit(' ', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:76:6:76:26::Use Bar.split.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:77:6:77:26::Use Bar.split.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:78:6:78:27::Use Bar.split.split(',', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:79:6:79:27::Use Bar.split.rsplit(',', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:82:4:82:23::Use '1,2,3'.split('\n', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:83:4:83:26::Use '1,2,3'.rsplit('split', maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:84:4:84:28::Use '1,2,3'.split('rsplit', maxsplit=1)[0] instead:UNDEFINED | ||
use-maxsplit-arg:96:11:96:30::Use SEQ.rsplit(None, maxsplit=1)[-1] instead:UNDEFINED | ||
use-maxsplit-arg:5:12:5:30::Use '1,2,3'.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:6:11:6:35::"Use '1,2,3'[::-1].split(',', maxsplit=1)[0] instead":HIGH | ||
use-maxsplit-arg:9:12:9:26::Use SEQ.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:10:11:10:25::Use SEQ.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:11:12:11:27::Use SEQ.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:12:11:12:26::Use SEQ.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:47:12:47:36::Use Foo.class_str.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:48:11:48:35::Use Foo.class_str.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:49:12:49:37::Use Foo.class_str.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:50:11:50:36::Use Foo.class_str.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:58:12:58:40::Use test.get_string().split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:59:11:59:39::Use test.get_string().rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:68:10:68:22::Use s.split(' ', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:69:10:69:22::Use s.rsplit(' ', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:78:6:78:26::Use Bar.split.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:79:6:79:26::Use Bar.split.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:80:6:80:27::Use Bar.split.split(',', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:81:6:81:27::Use Bar.split.rsplit(',', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:84:4:84:23::Use '1,2,3'.split('\n', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:85:4:85:26::Use '1,2,3'.rsplit('split', maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:86:4:86:28::Use '1,2,3'.split('rsplit', maxsplit=1)[0] instead:HIGH | ||
use-maxsplit-arg:99:11:99:30::Use SEQ.rsplit(None, maxsplit=1)[-1] instead:HIGH | ||
use-maxsplit-arg:100:11:100:31::Use SEQ.rsplit(None, maxsplit=1)[-1] instead:INFERENCE |