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

Fixup YAML utils comment #4226

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Fixup YAML utils comment #4226

merged 1 commit into from
Jun 21, 2024

Conversation

kousu
Copy link
Contributor

@kousu kousu commented Jun 20, 2024

Related: #4167

I left a stray thought in ansible#4167.  Sorry about that!
@kousu kousu requested a review from a team as a code owner June 20, 2024 18:54
@kousu kousu requested review from audgirka and alisonlhart and removed request for a team June 20, 2024 18:54
@kousu kousu changed the title Fixup comment Fixup YAML utils comment Jun 20, 2024
@kousu
Copy link
Contributor Author

kousu commented Jun 20, 2024

I'm also only 50% sure I understand this anymore.

# - hexadecimal like "0xF1"; comes tagged as int. Should continue unquoted to continue as an int.

seems to contradict

if (
self.event.value.startswith("0x")
and self.event.tag == "tag:yaml.org,2002:int"
and self.event.implicit[0]
):
# hexadecimal
self.event.tag = "tag:yaml.org,2002:str"

Why isn't it self.event.tag = "tag:yaml.org,2002:int"? Or just not having that line?

The tests are passing so maybe it's okay, but maybe the tests aren't testing hexadecimals fully?

@ssbarnea ssbarnea merged commit 7e9f77a into ansible:main Jun 21, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Can be missed from the changelog.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants