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

add functionality to ignore comments in .python-version file and fetch minimum Python version successfully #9519

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

mohammadalizabihitari
Copy link
Contributor

@mohammadalizabihitari mohammadalizabihitari commented Apr 17, 2024

Fixes #6650
Adds functionality to ignore comments in .python-version file, fetches the minimum Python version and unit test it.

@mohammadalizabihitari mohammadalizabihitari requested a review from a team as a code owner April 17, 2024 16:06
Comment on lines 87 to 89
content_lines = python_version_file.content.each_line.reject do |line|
line.strip.start_with?('#')
end
Copy link
Member

Choose a reason for hiding this comment

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

What if someone did this:

3.6.2 # We're using this version of python because of reasons

@abdulapopoola abdulapopoola requested a review from a team April 18, 2024 14:33
@mohammadalizabihitari mohammadalizabihitari changed the title fix-python-version: add fucntionality to ignore comments in .python-v… add functionality to ignore comments in .python-version file and fetch minimum Python version successfully Apr 18, 2024
Mohammadali Zabihitari added 2 commits April 19, 2024 10:00
@mohammadalizabihitari mohammadalizabihitari merged commit a00ddd3 into main Apr 19, 2024
59 checks passed
@mohammadalizabihitari mohammadalizabihitari deleted the mo/fix-python-version branch April 19, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimum Python version not detected if .python-version contains comments
2 participants