-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for infix_2_postfix() in infix_to_prefix_conversion.py #10095
Conversation
…conversion.py Add doctests Add exceptions for expressions with invalid bracket positions Add type hints for functions Fix a bug on line 53 (57 in PR)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
We need one pull request that ONLY adds doctests and does not modify the code. That will define the AS-IS behavior. We will merge this one first. The second will include those doctests modified to the proposed TO-BE code. |
Hi I see what you mean now, but the problem is the original code produces outputs with trailing spaces, so the "as-is" doctests cannot pass the current ruff check. That's why I have to change the code to change the output format with no trailing spaces. |
OK... This is the correct tests for the current code. Please rebase the other pull request AFTER this one is merged. |
…Algorithms#10095) * Add doctests, exceptions, type hints and fix bug for infix_to_prefix_conversion.py Add doctests Add exceptions for expressions with invalid bracket positions Add type hints for functions Fix a bug on line 53 (57 in PR) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Change type hints in infix_to_prefix_conversion.py * Remove printing trailing whitespace in the output table * Fix type hint errors * Fix doctests * Adjust table convention in output and doctests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add doctests for infix_2_postfix() * Update print_width * Update print_width * Fix the doctests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
Describe your change:
Related to #10063.
Checklist: