Skip to content

Files

Latest commit

 

History

History
20 lines (13 loc) · 391 Bytes

deprecated-types-field.md

File metadata and controls

20 lines (13 loc) · 391 Bytes

Pattern: Use of deprecated field on types module

Issue: -

Description

Emitted when accessing a field on types that has been removed in Python 3. Use the declarations in the builtin namespace instead.

Example of incorrect code:

from types import ListType
print(isinstance([], ListType))

Example of correct code:

print(isinstance([], list))