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

Python versions in github action YAML examples should be type string, not float #16167

Merged
merged 2 commits into from
Mar 11, 2022

Conversation

newmanrs
Copy link
Contributor

@newmanrs newmanrs commented Mar 10, 2022

Why:

Github action YAML examples on the python/js hybrid doc page have versions using floats, not string. This potentially creates an issue where users editing the examples to python version 3.10 will error after it is parsed as 3.1 (float) and later cast into "3.1" (string).
Fixes #14764, at least for python examples.

What's being changed:

Check off the following:

  • I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
  • For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

  • This pull request impacts the contribution experience
    • I have added the 'writer impact' label
    • I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

@newmanrs newmanrs requested a review from a team as a code owner March 10, 2022 02:32
@welcome
Copy link

welcome bot commented Mar 10, 2022

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Mar 10, 2022
@ramyaparimi ramyaparimi added engineering Will involve Docs Engineering playground and removed triage Do not begin working on this issue until triaged by the team labels Mar 10, 2022
@ramyaparimi
Copy link
Contributor

@newmanrs
Thanks so much for opening a PR! I'll get this triaged for review ⚡

Copy link
Contributor

@peterbe peterbe left a comment

Choose a reason for hiding this comment

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

I agree.
It actually works with numbers too, surprisingly.
Example: https://github.com/peterbe/django-fancy-cache/blob/e3cb62ff1474fb2fa839993ec92cc6436839b0c8/.github/workflows/ci.yml#L14
There, 3.10 had to become "3.10" so it wasn't YAML parsed as 3.1 but I much prefer to use quotation marks to avoid the risk in the first place.

👍

@ramyaparimi ramyaparimi added the ready to merge This pull request is ready to merge label Mar 11, 2022
@ramyaparimi ramyaparimi merged commit bed115a into github:main Mar 11, 2022
@github-actions
Copy link
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Will involve Docs Engineering ready to merge This pull request is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quote language versions in YAML examples
3 participants