Skip to content

docs: add docstring and doctests to generate_all_permutations) - #15055

Open
dwaddle wants to merge 1 commit into
TheAlgorithms:masterfrom
dwaddle:add-docstring-all-permutations
Open

docs: add docstring and doctests to generate_all_permutations)#15055
dwaddle wants to merge 1 commit into
TheAlgorithms:masterfrom
dwaddle:add-docstring-all-permutations

Conversation

@dwaddle

@dwaddle dwaddle commented Aug 20, 2026

Copy link
Copy Markdown

This pull request adds a missing docstring to the generate_all_permutations
function in backtracking/all_permutations.py to improve code readability and
maintainability. It also includes two simple doctests to verify the correct
behavior of the function.

- [x] Added a docstring explaining the function's purpose
- [x] Added `doctests` for basic list and string inputs
- [x] Ran `pytest` locally and all tests passed successfully

This is my first contribution to this repository. Let me know if any changes are

required!

@algorithms-keeper algorithms-keeper Bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Aug 20, 2026

@prashantpiyush1111 prashantpiyush1111 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PR. The change is appropriately scoped to backtracking/all_permutations.py and adds a clear docstring plus basic doctests for both list and string inputs. The proposed examples match the function's printed output, and there are no unrelated changes. I don't see a blocking issue in the shown diff.

One thing to note: the PR body says pytest was run locally, but that execution is not independently verifiable from the PR diff alone. Please ensure the relevant test suite/doctests pass in CI before merge.

@dwaddle

dwaddle commented Sep 2, 2026

Copy link
Copy Markdown
Author

@prashantpiyush1111 Thank you for the review! I can confirm that all automated CI checks
│ (including the build and linting checks) have successfully passed on this PR.

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

Labels

awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants