jet-admin / jet-bridge

Bad comparison test PTC-W0023
Anti-pattern
Minor
6 months ago4 years old
Use is when comparing type of two objects
47                                "or a comma-separated string" %
48                                (option.name, option.type.__name__))
49
50            if type(value) == str and option.type != str:51                option.parse(value)
52            else:
53                option.set(value)
Use is when comparing type of two objects
16                                "or a comma-separated string" %
17                                (option.name, option.type.__name__))
18
19            if type(os.environ[name]) == str and option.type != str:20                option.parse(os.environ[name])
21            else:
22                option.set(os.environ[name])