Skip to content

Conversation

@magdaaniol
Copy link
Contributor

@magdaaniol magdaaniol commented Sep 5, 2025

This PR improves handling of type hints that sometimes arrive as plain strings on Windows (e.g. "str", "Path") instead of Python types.

get_arg is updated to normalize param_type when it is a string:
If the string matches a known base type ("str", "int", "float", "Path"), it is mapped to the corresponding Python type.
Otherwise, the string is discarded (param_type = None), ensuring that only Type, ConverterType, or None reach ArgparseArg.type.

Related support forum ticket: https://support.prodi.gy/t/bug-report-loading-custom-recipe-raises-unsupported-type-for-dataset-str/7606

@magdaaniol magdaaniol changed the title Fix/type stringification prevent raw str leaking into ArgparseArg.type Sep 5, 2025
@magdaaniol magdaaniol requested a review from ines September 5, 2025 14:07
@magdaaniol magdaaniol merged commit ff5ef65 into main Sep 9, 2025
18 checks passed
@magdaaniol magdaaniol deleted the fix/type-stringification branch September 9, 2025 10:04
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.

3 participants