Skip to content

fix: allow int type for truncation_limit_lines and truncation_limit_chars in TOML configs#14689

Open
muhamedfazalps wants to merge 1 commit into
pytest-dev:mainfrom
muhamedfazalps:fix/truncation-limit-int-type
Open

fix: allow int type for truncation_limit_lines and truncation_limit_chars in TOML configs#14689
muhamedfazalps wants to merge 1 commit into
pytest-dev:mainfrom
muhamedfazalps:fix/truncation-limit-int-type

Conversation

@muhamedfazalps

Copy link
Copy Markdown

These config options were parsed as strings, causing a TypeError when users specified integer values in pyproject.toml or pytest.toml. Using type='int' allows both string and integer values.

Fixes #14675

…hars in TOML configs

These config options were parsed as strings, causing a TypeError when
users specified integer values in pyproject.toml or pytest.toml. Using
type="int" allows both string and integer values.

Fixes pytest-dev#14675

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for working on this. I have a feeling that we can also avoid a bunch of int call and handling both int and string (or "no restriction" being encoded as either 0 or None), downstream later. We still need to take into account the public API that should keep working for string though. I didn't look too much into it, let me know if the scope become too big and necessitate another PR.

@Pierre-Sassoulas

Copy link
Copy Markdown
Member

Also we'd need a changelog for that I think.

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.

truncation_limit_lines and truncation_limit_chars should accept integer values in .toml configs

2 participants