pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.26k stars 1.12k forks source link

Missing timeout for requests.Session object? #9517

Open fossilet opened 6 months ago

fossilet commented 6 months ago

Question

missing-timeout / W3101 reports in my codebase requests.get calls, but not for:

session = requests.Session()
session.get(url)

Is it possible to make pylint also warn about these cases?

Documentation for future user

in code and docs.

Additional context

No response

joel6948 commented 6 months ago

https://github.com/pylint-dev/pylint/pull/9525#issue-2217965137

i have added which may help in solving it please let me know issues regarding it

use the command below for checks pylint --load-plugins=pylint_plugins.requests_timeout_plugin your_code.py