fossasia / open-event-server

Bad comparison test PTC-W0023
Anti-pattern
Minor
5 months ago4 years old
Use is when comparing type of two objects
23            map(
24                lambda entry: entry[1],
25                filter(
26                    lambda entry: not entry[0].startswith('__') and type(entry[1]) == str,27                    NotificationType.__dict__.items(),
28                ),
29            )
Use is when comparing type of two objects
 50            map(
 51                lambda entry: entry[1],
 52                filter(
 53                    lambda entry: not entry[0].startswith('__') and type(entry[1]) == str, 54                    MailType.__dict__.items(),
 55                ),
 56            )