Skip to content
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

Fix trailing whitespace issue #635

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Fix trailing whitespace issue #635

merged 1 commit into from
Oct 16, 2024

Conversation

addie9800
Copy link
Collaborator

I was able to reproduce the issue causing pytest to fail on GitHub. It's failing due to an update that was released for xmttodict (installing xmltodict 0.14.1 reproduces the error, while no errors are raised with 0.13.0), although that is not the reason for the errors. What changed with the update is that the values were not stripped anymore causing the assertion errors.
That leads to the question, why stripping was necessary in the first place. Turns out, they are introduced by including the tail of a node into string representation of the node. Since the tail only includes the content between the closing tag of that node and the starting tag of the next node, I think it can be safely removed.

@addie9800 addie9800 requested a review from MaxDall October 15, 2024 17:10
@MaxDall
Copy link
Collaborator

MaxDall commented Oct 15, 2024

@addie9800 Wow, thanks a lot! Especially for the in-depth explanation. That's an awesome fix 🚀

@addie9800 addie9800 merged commit 89279f8 into master Oct 16, 2024
4 checks passed
@addie9800 addie9800 deleted the pytest-issue-fix branch October 16, 2024 07:19
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.

2 participants