Skip to content

Commit

Permalink
Fix dangerous default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored and messense committed Jan 24, 2021
1 parent fcc61ce commit 36ef6b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wechatpy/client/api/wxa.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ def get_wxa_code(
path,
width=430,
auto_color=False,
line_color={"r": "0", "g": "0", "b": "0"},
line_color=None,
is_hyaline=False,
):
"""
创建小程序码(接口A: 适用于需要的码数量较少的业务场景)
详情请参考
https://mp.weixin.qq.com/debug/wxadoc/dev/api/qrcode.html
"""
if line_color is None:
line_color = {"r": "0", "g": "0", "b": "0"}
return self._post(
"wxa/getwxacode",
data={
Expand All @@ -46,7 +48,7 @@ def get_wxa_code_unlimited(
scene,
width=430,
auto_color=False,
line_color={"r": "0", "g": "0", "b": "0"},
line_color=None,
page=None,
is_hyaline=False,
):
Expand All @@ -55,6 +57,8 @@ def get_wxa_code_unlimited(
详情请参考
https://mp.weixin.qq.com/debug/wxadoc/dev/api/qrcode.html
"""
if line_color is None:
line_color = {"r": "0", "g": "0", "b": "0"}
return self._post(
"wxa/getwxacodeunlimit",
data=optionaldict(
Expand Down

0 comments on commit 36ef6b4

Please sign in to comment.