hasgeek / funnel

Exceptions are overlapping PYL-W0714
Anti-pattern
Major
6 occurrences in this check
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
71                timeout=30,
72                headers={'Authorization': f'Bearer {response["access_token"]}'},
73            ).json()
74        except (75            requests.exceptions.RequestException,
76            requests.exceptions.JSONDecodeError,
77        ) as exc:
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
115                params={'oauth2_access_token': response['access_token']},
116                headers={'x-li-format': 'json'},
117            ).json()
118        except (119            requests.exceptions.RequestException,
120            requests.exceptions.JSONDecodeError,
121        ) as exc:
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
 93                params={'oauth2_access_token': response['access_token']},
 94                headers={'x-li-format': 'json'},
 95            ).json()
 96        except ( 97            requests.exceptions.RequestException,
 98            requests.exceptions.JSONDecodeError,
 99        ) as exc:
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
 75                    'redirect_uri': callback_url,
 76                },
 77            ).json()
 78        except ( 79            requests.exceptions.RequestException,
 80            requests.exceptions.JSONDecodeError,
 81        ) as exc:
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
54                    )
55                },
56            ).json()
57        except (58            client.FlowExchangeError,
59            requests.exceptions.RequestException,
60            requests.exceptions.JSONDecodeError,
Overlapping exceptions (requests.exceptions.RequestException is an ancestor class of requests.exceptions.JSONDecodeError)
 72                    'Authorization': f'token {response["access_token"]}',
 73                },
 74            ).json()
 75        except ( 76            requests.exceptions.RequestException,
 77            requests.exceptions.JSONDecodeError,
 78        ) as exc: