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

Can we use Beeprint for objects? #23

Open
rodfersou opened this issue Mar 15, 2022 · 7 comments
Open

Can we use Beeprint for objects? #23

rodfersou opened this issue Mar 15, 2022 · 7 comments

Comments

@rodfersou
Copy link

https://github.com/panyanyany/beeprint

@rodfersou
Copy link
Author

@jedie any reason for the thumbs down?

@rodfersou
Copy link
Author

I'm creating a fork after wait more than 1 year for a feedback

thanks again 🙏

@hjwp
Copy link
Owner

hjwp commented Jun 7, 2023

haha sorry i'm not a very good maintainer.

would love to see some side-by-side comparisons of beeprint vs icdiff, if you get it all up and running?

@rodfersou
Copy link
Author

rodfersou commented Jul 5, 2023

@hjwp be my guest https://github.com/rodfersou/pytest-beeprint

it play nice with pydantic models after few tweaks in repr

@rodfersou
Copy link
Author

@hjwp
image

@hjwp
Copy link
Owner

hjwp commented Nov 8, 2023

looks good! is it ok if i merge in your fork? i'll credit you in the readme...

@hjwp hjwp reopened this Nov 8, 2023
@hjwp
Copy link
Owner

hjwp commented Nov 8, 2023

ok so the problem i ran into is that beeprint seems to ignore the width= argument, so it doesn't handle some long input types well. eg:

>>> beeprint.pp(list(range(50)), width=20)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]
>>> beeprint.pp("hello " * 50, width=20)
'hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello
 hello hello hello hello hello hello '

I'd expect the two examples above to be breaking into multiple lines as soon as the width hits 20.

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

2 participants