Skip to content

Fix config file type parsing (#311)#445

Open
Bradcher wants to merge 1 commit intotrailofbits:masterfrom
Bradcher:fix-issue-311-config-types
Open

Fix config file type parsing (#311)#445
Bradcher wants to merge 1 commit intotrailofbits:masterfrom
Bradcher:fix-issue-311-config-types

Conversation

@Bradcher
Copy link
Copy Markdown

Fixes #311.

configparser returns every INI value as a string, so arguments declared
with type=int, type=float, or action="store_true" silently ended up as
strings and crashed subprocess.communicate(timeout=self.timeout) with
a TypeError.

Added a small helper that walks parser._actions after the config merge
and coerces string values back to their declared types. Invalid values
raise AnalysisBackendError.

Tests in tests/test_config_types.py exercise the helper directly.

configparser returns everything as strings, so --timeout=60 from a config
file ends up as the string "60" and crashes subprocess.communicate with
a TypeError. Added a helper that walks the argparse actions and coerces
values back to int/float/bool after the config merge.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 24, 2026

CLA assistant check
All committers have signed the CLA.

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.

running deepstate with config file -> types recognition bug

2 participants