Skip to content

Convert string bolean values to boolean data types#113

Merged
sgruber-seibert merged 4 commits into
mainfrom
type_conversion_from_csv
Apr 7, 2026
Merged

Convert string bolean values to boolean data types#113
sgruber-seibert merged 4 commits into
mainfrom
type_conversion_from_csv

Conversation

@sgruber-seibert
Copy link
Copy Markdown
Contributor

When variables are read from a csv file, the values are read as strings. When variables are read from a CSV file, the values are read as strings. This may cause unexpected behavior because any non-empty string is "True" in Python.

Example:

x = "False"
if x is True:
    print(x)

This PR converts string values "true" and "false" (case-insensitive) to actual booleans when reading from CSV, so that they behave as expected in conditions.

@sschmachtel
Copy link
Copy Markdown
Collaborator

What about variable from other points
like

  • test=remote@target: echo "True"
    Is this also supported?

@sgruber-seibert
Copy link
Copy Markdown
Contributor Author

What about variable from other points like

  • test=remote@target: echo "True"
    Is this also supported?

This is currently not supported.

@sgruber-seibert
Copy link
Copy Markdown
Contributor Author

What about variable from other points like

  • test=remote@target: echo "True"
    Is this also supported?

Now it will casts string bools from cli, local and remote commands as boolean data types.

@sschmachtel
Copy link
Copy Markdown
Collaborator

Looks good to me now :-)

@sgruber-seibert sgruber-seibert merged commit bb4e8b6 into main Apr 7, 2026
3 checks passed
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.

2 participants