Pattern: Missing format attribute
Issue: -
Used when a PEP 3101 format string uses an attribute specifier, but the argument passed for formatting doesn't have that attribute. This message can't be emitted when using Python < 2.7.
Example of incorrect code:
file = open('out.txt', 'w')
"My name is {0.unknown}".format(file) # file type does not have 'unknown'
Examples of correct code:
file = open('out.txt', 'w')
"My name is {0.name}".format(file)