Repository Analysis

psf/requests

A simple, yet elegant, HTTP library.

17.9 Moderate AI signal View on GitHub
17.9
Adjusted Score
17.9
Raw Score
100%
Time Factor
2026-05-18
Last Push
54,009
Stars
Python
Language
15,150
Lines of Code
67
Files
316
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 7LOW 308

Pattern Findings

316 matches across 9 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers196 hits · 144 pts
SeverityFileLineSnippet
LOWtests/test_utils.py66 def test_super_len_correctly_calculates_len_of_partially_read_file(self):
LOWtests/test_utils.py73 def test_super_len_handles_files_raising_weird_errors_in_tell(self, error):
LOWtests/test_utils.py86 def test_super_len_tell_ioerror(self, error):
LOWtests/test_utils.py127 def test_super_len_with__len__(self):
LOWtests/test_utils.py132 def test_super_len_with_no__len__(self):
LOWtests/test_utils.py145 def test_super_len_with_fileno(self):
LOWtests/test_utils.py151 def test_super_len_with_no_matches(self):
LOWtests/test_utils.py165 def test_not_vulnerable_to_bad_url_parsing(self, tmp_path, monkeypatch):
LOWtests/test_utils.py173 def test_empty_default_credentials_ignored(self, tmp_path, monkeypatch):
LOWtests/test_utils.py263 def test_bypass_no_proxy_keyword(self, url):
LOWtests/test_utils.py277 def test_not_bypass_no_proxy_keyword(self, url, monkeypatch):
LOWtests/test_utils.py325 def test_guess_filename_invalid(self, value):
LOWtests/test_utils.py335 def test_guess_filename_valid(self, value, expected_type):
LOWtests/test_utils.py352 def test_unzipped_paths_unchanged(self, path):
LOWtests/test_utils.py355 def test_zipped_paths_extracted(self, tmpdir):
LOWtests/test_utils.py635def test__parse_content_type_header(value, expected):
LOWtests/test_utils.py654def test_get_encoding_from_headers(value, expected):
LOWtests/test_utils.py713def test_prepend_scheme_if_needed(value, expected):
LOWtests/test_utils.py759def test_should_bypass_proxies(url, expected, monkeypatch):
LOWtests/test_utils.py787def test_should_bypass_proxies_pass_only_hostname(url, expected):
LOWtests/test_utils.py803def test_add_dict_to_cookiejar(cookiejar):
LOWtests/test_utils.py838def test_should_bypass_proxies_no_proxy(url, expected, monkeypatch):
LOWtests/test_utils.py861def test_should_bypass_proxies_no_proxy_domain_boundary(url, expected):
LOWtests/test_utils.py886def test_should_bypass_proxies_win_registry(url, expected, override, monkeypatch):
LOWtests/test_utils.py924def test_should_bypass_proxies_win_registry_bad_values(monkeypatch):
LOWtests/test_utils.py974def test_set_environ_raises_exception():
LOWtests/test_utils.py426 def test_bad_utf_like_encoding(self):
LOWtests/test_utils.py491def test_requote_uri_with_unquoted_percents(uri, expected):
LOWtests/test_packages.py8def test_can_access_idna_attribute():
LOWtests/test_packages.py12def test_can_access_chardet_attribute():
LOWtests/test_testserver.py63 def test_basic_waiting_server(self):
LOWtests/test_testserver.py117 def test_requests_after_timeout_are_not_received(self):
LOWtests/test_testserver.py130 def test_request_recovery_with_bigger_timeout(self):
LOWtests/test_testserver.py144 def test_server_finishes_on_error(self):
LOWtests/test_testserver.py156 def test_server_finishes_when_no_connections(self):
LOWtests/test_requests.py130 def test_no_body_content_length(self, httpbin, method):
LOWtests/test_requests.py135 def test_empty_content_length(self, httpbin, method):
LOWtests/test_requests.py139 def test_override_content_length(self, httpbin):
LOWtests/test_requests.py145 def test_path_is_not_double_encoded(self):
LOWtests/test_requests.py390 def test_cookie_sent_on_redirect(self, httpbin):
LOWtests/test_requests.py396 def test_cookie_removed_on_expire(self, httpbin):
LOWtests/test_requests.py406 def test_cookie_quote_wrapped(self, httpbin):
LOWtests/test_requests.py411 def test_cookie_persists_via_api(self, httpbin):
LOWtests/test_requests.py417 def test_request_cookie_overrides_session_cookie(self, httpbin):
LOWtests/test_requests.py425 def test_request_cookies_not_persisted(self, httpbin):
LOWtests/test_requests.py431 def test_generic_cookiejar_works(self, httpbin):
LOWtests/test_requests.py617 def test_respect_proxy_env_on_send_self_prepared_request(self, httpbin):
LOWtests/test_requests.py624 def test_respect_proxy_env_on_send_session_prepared_request(self, httpbin):
LOWtests/test_requests.py632 def test_respect_proxy_env_on_send_with_redirects(self, httpbin):
LOWtests/test_requests.py641 def test_respect_proxy_env_on_get(self, httpbin):
LOWtests/test_requests.py647 def test_respect_proxy_env_on_request(self, httpbin):
LOWtests/test_requests.py653 def test_proxy_authorization_preserved_on_request(self, httpbin):
LOWtests/test_requests.py1068 def test_urlencoded_get_query_multivalued_param(self, httpbin):
LOWtests/test_requests.py1073 def test_form_encoded_post_query_multivalued_element(self, httpbin):
LOWtests/test_requests.py1080 def test_different_encodings_dont_break_post(self, httpbin):
LOWtests/test_requests.py1731 def test_header_remove_is_case_insensitive(self, httpbin):
LOWtests/test_requests.py1738 def test_params_are_merged_case_sensitive(self, httpbin):
LOWtests/test_requests.py1744 def test_long_authinfo_in_url(self):
LOWtests/test_requests.py1753 def test_header_keys_are_native(self, httpbin):
LOWtests/test_requests.py1861 def test_can_send_objects_with_files(self, httpbin, files):
136 more matches not shown…
Unused Imports83 hits · 70 pts
SeverityFileLineSnippet
LOWtests/compat.py4
LOWtests/compat.py6
LOWtests/test_requests.py97
LOWsrc/requests/cookies.py10
LOWsrc/requests/auth.py8
LOWsrc/requests/auth.py25
LOWsrc/requests/sessions.py9
LOWsrc/requests/sessions.py39
LOWsrc/requests/sessions.py48
LOWsrc/requests/_types.py10
LOWsrc/requests/_types.py61
LOWsrc/requests/hooks.py13
LOWsrc/requests/compat.py12
LOWsrc/requests/compat.py79
LOWsrc/requests/compat.py80
LOWsrc/requests/compat.py80
LOWsrc/requests/compat.py80
LOWsrc/requests/compat.py81
LOWsrc/requests/compat.py82
LOWsrc/requests/compat.py83
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py88
LOWsrc/requests/compat.py100
LOWsrc/requests/compat.py100
LOWsrc/requests/compat.py100
LOWsrc/requests/compat.py100
LOWsrc/requests/compat.py100
LOWsrc/requests/compat.py67
LOWsrc/requests/compat.py74
LOWsrc/requests/compat.py76
LOWsrc/requests/compat.py71
LOWsrc/requests/models.py8
LOWsrc/requests/models.py15
LOWsrc/requests/__init__.py41
LOWsrc/requests/__init__.py158
LOWsrc/requests/__init__.py158
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py159
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
LOWsrc/requests/__init__.py171
23 more matches not shown…
Over-Commented Block15 hits · 15 pts
SeverityFileLineSnippet
LOWdocs/conf.py1# -*- coding: utf-8 -*-
LOWdocs/conf.py61copyright = u"Kenneth Reitz and contributors"
LOWdocs/conf.py81# non-false value, then it is used:
LOWdocs/conf.py101# If true, sectionauthor and moduleauthor directives will be shown in the
LOWdocs/conf.py141# html_title = None
LOWdocs/conf.py201# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
LOWdocs/conf.py221# A dictionary with options for the search language support, empty by default.
LOWdocs/conf.py241 # Latex figure (float) alignment
LOWdocs/conf.py261# latex_show_pagerefs = False
LOWdocs/conf.py321# The basename for the epub file. It defaults to the project name.
LOWdocs/conf.py341# A unique identification for the text.
LOWdocs/conf.py361# The depth of the table of contents in toc.ncx.
LOW.github/workflows/codeql-analysis.yml61
LOWsrc/requests/sessions.py461 #: :class:`Request <Request>`. The dictionary values may be lists for
LOWsrc/requests/sessions.py481 #: cert file (.pem). If Tuple, ('cert', 'key') pair.
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMsrc/requests/compat.py32# -------------------
MEDIUMsrc/requests/compat.py34# -------------------
MEDIUMsrc/requests/compat.py85# --------------
MEDIUMsrc/requests/compat.py87# --------------
Deep Nesting11 hits · 11 pts
SeverityFileLineSnippet
LOWsrc/requests/cookies.py604
LOWsrc/requests/cookies.py401
LOWsrc/requests/cookies.py423
LOWsrc/requests/auth.py157
LOWsrc/requests/models.py152
LOWsrc/requests/models.py184
LOWsrc/requests/models.py574
LOWsrc/requests/utils.py160
LOWsrc/requests/utils.py810
LOWsrc/requests/help.py37
LOWsrc/requests/adapters.py634
Cross-Language Confusion1 hit · 8 pts
SeverityFileLineSnippet
HIGHtests/test_requests.py3064 '{"responseCode":["706"],"data":null}{"responseCode":["706"],"data":null}',
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to its
MEDIUMsrc/requests/sessions.py622 # Create the Request.
AI Slop Vocabulary3 hits · 3 pts
SeverityFileLineSnippet
MEDIUMsrc/requests/sessions.py757 # Set defaults that the hooks can utilize to ensure they always have
LOWsrc/requests/models.py723 # method. To prevent iterating over None, simply use an empty list
LOWsrc/requests/utils.py491 # a UNC path, then just return the value without quotes. Using the
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/requests/models.py579 # Check if file, fo, generator, iterator.