In Transport.init (transport.py#L109), the DSN check contains a redundant is not None guard:
if options and options["dsn"] is not None and options["dsn"]:
The is not None check is unnecessary — the subsequent truthiness check already evaluates None as falsy, making it redundant.
This is also inconsistent with the existing pattern later in the same file:
transport.py L1165
if options["dsn"]:
Suggested Change
- if options and options["dsn"] is not None and options["dsn"]:
- if options and options["dsn"]:
In Transport.init (transport.py#L109), the DSN check contains a redundant is not None guard:
if options and options["dsn"] is not None and options["dsn"]:
The is not None check is unnecessary — the subsequent truthiness check already evaluates None as falsy, making it redundant.
This is also inconsistent with the existing pattern later in the same file:
transport.py L1165
if options["dsn"]:
Suggested Change