Repository navigation
Conversation
Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.Algorithmis defined asAlgorithm = AlgorithmSuite, and Sphinx does not follow that alias when it resolves:type:/:rtype:references, so parameters documented asAlgorithmrender without a link (theencryptexample in the issue). This changes the docstring type references to nameAlgorithmSuitedirectly, as the issue proposes.Changes:
:type ...:/:rtype:lines in 19 files (src/, two files underdecrypt_oracle/, andexamples/test/legacy/v3_default_cmm.py) now readaws_encryption_sdk.identifiers.AlgorithmSuite.Algorithmalias itself, theAlgorithm.Xmember accesses ininternal/defaults.pyand theinstance_of(...Algorithm)validator instructures.pyare untouched, so there is no behaviour change.test/unit/test_docstring_algorithm_alias.py, which fails if a:type:/:rtype:line undersrc/referencesidentifiers.Algorithmagain.Checked:
pytest test/unitin a fresh venv on this branch gives 4230 passed, 20 skipped. The new test fails when run against the unmodifiedsrc/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_handlerstest 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.