OreosLab / checkinpanel

Re-defined variable from outer scope PYL-W0621
Anti-pattern
Major
a year agoa year old
Redefining name 'json' from outer scope (line 6)
169        f'access_token={push_config.get("DD_BOT_TOKEN")}&timestamp={timestamp}&sign={sign}'
170    )
171    headers = {"Content-Type": "application/json;charset=utf-8"}
172    json = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}}173
174    try:
175        response = requests.post(url=url, json=json, headers=headers, timeout=15)
Redefining name 'json' from outer scope (line 6)
188        f'access_token={push_config.get("DD_BOT_TOKEN")}&timestamp={timestamp}&sign={sign}'
189    )
190    headers = {"Content-Type": "application/json;charset=utf-8"}
191    json = {192        "msgtype": "markdown",
193        "markdown": {"text": html2md(content), "title": title},
194    }