Skip to content

docs: use AlgorithmSuite in docstring type references - #838

Open
MaxonT wants to merge 1 commit into
aws:masterfrom
MaxonT:contrib/61-auto
Open

MaxonT wants to merge 1 commit into
aws:masterfrom
MaxonT:contrib/61-auto

Conversation

@MaxonT

@MaxonT MaxonT commented Nov 25, 2026

Copy link
Copy Markdown

The Algorithm alias reads fine in the code but breaks the links in the docs, so I switched 58 :type: and :rtype: lines in 19 files to AlgorithmSuite; I didn't run the Sphinx build, so could you check the rendered links?

Refs #61

aws_encryption_sdk.identifiers.Algorithm is defined as Algorithm = AlgorithmSuite, and Sphinx does not follow that alias when it resolves :type: / :rtype: references, so parameters documented as Algorithm render without a link (the encrypt example in the issue). This changes the docstring type references to name AlgorithmSuite directly, as the issue proposes.

Changes:

  • 58 :type ...: / :rtype: lines in 19 files (src/, two files under decrypt_oracle/, and examples/test/legacy/v3_default_cmm.py) now read aws_encryption_sdk.identifiers.AlgorithmSuite.
  • Only docstring lines changed. The Algorithm alias itself, the Algorithm.X member accesses in internal/defaults.py and the instance_of(...Algorithm) validator in structures.py are untouched, so there is no behaviour change.
  • Added test/unit/test_docstring_algorithm_alias.py, which fails if a :type: / :rtype: line under src/ references identifiers.Algorithm again.

Checked: pytest test/unit in a fresh venv on this branch gives 4230 passed, 20 skipped. The new test fails when run against the unmodified src/ and passes with the change.

Not verified: I did not build the Sphinx docs, so I have not looked at the rendered links myself, and I did not run tox, the lint environments, the integration/functional suites or the decrypt_oracle / test_vector_handlers test suites. The new test file was only checked with a newer black than the repo pins.

Thanks to @4gatepylon for filing this with the rendered page and source links.

Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
@MaxonT
MaxonT requested a review from a team as a code owner November 25, 2026 04:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant