Skip to content

🐛 Fix case with single folder with non-default version#41

Merged
tiangolo merged 2 commits intotiangolo:mainfrom
YuriiMotov:fix-case-with-single-non_default-folder
Dec 12, 2025
Merged

🐛 Fix case with single folder with non-default version#41
tiangolo merged 2 commits intotiangolo:mainfrom
YuriiMotov:fix-case-with-single-non_default-folder

Conversation

@YuriiMotov
Copy link
Contributor

This fixes the case when we have only one version, version is encoded in folder name, and version is not default.

.
├── app_py310
│   └── main.py

Previously, since the number of found version is 1 in both cases (by file name and by folder name) the version found by name was used. And since file name doesn't have any prefixes, it was marked as "Python 3.8+" regardless the prefixes in folder name.
Now the algorithm checks if the version found by file name is default version (non-annotated Python 3.8) and uses the version found by folder name if it's not default.

Copy link
Owner

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

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

Nice, thank you! 🚀

@tiangolo tiangolo added the bug Something isn't working label Dec 12, 2025
@tiangolo tiangolo enabled auto-merge (squash) December 12, 2025 16:08
@tiangolo tiangolo merged commit d95c452 into tiangolo:main Dec 12, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants