Fixing use of explicit type comparison to use of isinstance is not reported in verbose output
When using -a, type(a) == foo is fixed to isinstance(a, foo), but this action is not reported in -vvvvv output.
As a result, I don't what know what E or W number to use to turn this behavior off.
This is probably the lib2to3-based fixer, which I think is in W690.
Thanks.
Shouldn't -vvvvv at least say that it's running a lib2to3 fixer for W690?
That would make sense. I'm not sure why it doesn't.
When not using -a, the tool revealed that it wants to fix issue E721 on that line. So it's unrelated to lib2to3.
$ cat ~/ins.py
a = "a"
foo = 1
type(a) == foo
$ 2to3 -f all -f idioms ins.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored ins.py
--- ins.py (original)
+++ ins.py (refactored)
@@ -1,3 +1,3 @@
a = "a"
foo = 1
-type(a) == foo
+isinstance(a, foo)
RefactoringTool: Files that need to be modified:
RefactoringTool: ins.py
E721 is global fixer with lib2to3. https://github.com/hhatto/autopep8/blob/master/autopep8.py#L103