Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception #671

Closed
Sh4pe opened this issue Nov 13, 2024 · 1 comment
Closed

Exception #671

Sh4pe opened this issue Nov 13, 2024 · 1 comment

Comments

@Sh4pe
Copy link

Sh4pe commented Nov 13, 2024

As of version 24.3.0 (see #627), ExceptionDictTransformer interprets the constructor arguments locals_max_string and locals_max_length as type int | None where None supposedly disables abbreviation or truncation. However, if you set one of those to None, you get a TypeError:

TypeError: '<' not supported between instances of 'NoneType' and 'int'

This is because of the following snippet:

if locals_max_length < 0:
msg = f'"locals_max_length" must be >= 0: {locals_max_length}'
raise ValueError(msg)
if locals_max_string < 0:
msg = f'"locals_max_string" must be >= 0: {locals_max_string}'
raise ValueError(msg)

It should contain logic that handles the None case.

@Sh4pe
Copy link
Author

Sh4pe commented Nov 13, 2024

Huh, it appears I've opened this issue twice. I'll close this one.

@Sh4pe Sh4pe closed this as completed Nov 13, 2024
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

No branches or pull requests

1 participant