pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

E721: mistake due to isidentifier() not considering '.'

Open tedzhu opened this issue 8 years ago • 4 comments

E721 (do not compare types, use 'isinstance()') has an exception that allows comparison for types which are not obvious. It uses isidentifier() to determine whether it is a variable. This will miss the cases where '.' is included, such as 'type(self.member1)'. So the warning will appear while it shouldn't.

tedzhu avatar Jul 07 '17 15:07 tedzhu