Skip to content

Conversation

@erichlf
Copy link
Collaborator

@erichlf erichlf commented Mar 22, 2025

This PR makes it so that "true", "True", "false", or "False" are evaluated as boolean values.

Fixes #6

Motivation and Context

When "False" is used as a parameter value it will evaluate to True, which is definitely not expected by most people. The workaround for this was to use "$(False)", but that feels clumsy.

Changes

  • Fix reading strings as booleans

Type of changes

  • Bug fix

Checklist

  • Update dependencies
  • Update version
  • Update README

Testing

  1. colcon build --packages-up-to py_trees_parser
  2. colcon test --event-handlers console_cohesion+ --packages-select py_trees_parser

@erichlf erichlf requested review from SyZbidi and dave992 March 22, 2025 19:41
@erichlf erichlf merged commit d2136a0 into humble Mar 24, 2025
1 check passed
@erichlf erichlf deleted the string_bool_fix branch March 24, 2025 12:11
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.

Maybe "False" or "True" should be evaluated as booleans and not strings?

2 participants