Skip to content

Commit

Permalink
Default 'options' to None instead of an empty dict
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed Jan 24, 2024
1 parent d0c0c92 commit 1a4a63d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bugsnag/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Delivery:
def __init__(self):
self.sent_session_warning = False

def deliver(self, config, payload: Any, options={}):
def deliver(self, config, payload: Any, options=None):
"""
Sends error reports to Bugsnag
"""
Expand Down Expand Up @@ -98,8 +98,9 @@ def safe_request():


class UrllibDelivery(Delivery):

def deliver(self, config, payload: Any, options={}):
def deliver(self, config, payload: Any, options=None):
if options is None:
options = {}

def request():
uri = options.pop('endpoint', config.endpoint)
Expand Down Expand Up @@ -136,8 +137,9 @@ def request():


class RequestsDelivery(Delivery):

def deliver(self, config, payload: Any, options={}):
def deliver(self, config, payload: Any, options=None):
if options is None:
options = {}

def request():
uri = options.pop('endpoint', config.endpoint)
Expand Down

0 comments on commit 1a4a63d

Please sign in to comment.