pycodestyle
pycodestyle copied to clipboard
E721: mistake due to isidentifier() not considering '.'
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.