Fix RedTeam.scan method documentation: correct timeout default and add missing user_agent parameter #42682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes two documentation inconsistencies in the
RedTeam.scan
method that could confuse developers using the API:Issues Fixed
1. Incorrect timeout default documentation
The docstring incorrectly stated the timeout default as 120 seconds, but the actual default value in the method signature is 3600 seconds:
2. Missing user_agent parameter documentation
The
user_agent
parameter is accepted via**kwargs
and used internally, but was not documented:Changes Made
(default: 120)
to(default: 3600)
to match the actual default valueuser_agent
parameter:These changes ensure the API documentation accurately reflects the method's behavior, helping developers understand the correct default values and available parameters when calling the scan method.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
pypi.org
/home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/lib/python3.9/site-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-9hw9p1be/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i REDACTED -- setuptools>=40.8.0
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.