Skip to content

ref(transport): Simplify redundant DSN check in Transport.__init__ #6089

Closed

Description

@psh9508

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"]:

Activity

  1. linear-code commented on Apr 17, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 17, 2026
  3. ericapisani commented on Apr 20, 2026

    @ericapisani
    Member

    Hi @psh9508 ,

    Thanks for opening an issue! If you're keen, you're more than welcome to open a PR for this, but otherwise someone from our team can take a look at this.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 20, 2026
  5. added a commit that references this issue on Apr 24, 2026
    1b72b88
  6. added a commit that references this issue on Aug 9, 2026
    6629104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions