Useless type

Fix a wrong `useless-type` warning for attributes.
Extends the `useless-type` warning to local variables.