explosion / explosion/wasabi

Option to adjust default text wrap length

Open
#23 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
471
Forks
24
PR merge metrics
No merged PRs in 30d

Description

The [wrap](https://github.com/ines/wasabi#function-wrap) function takes a `wrap_max` argument that controls the maximum line width. When I'm using the typical functions for printing formatted messages like [good](https://github.com/ines/wasabi#method-printergood-printerfail-printerwarn-printerinfo), [fail](https://github.com/ines/wasabi#method-printergood-printerfail-printerwarn-printerinfo), [warn](https://github.com/ines/wasabi#method-printergood-printerfail-printerwarn-printerinfo), and [info](https://github.com/ines/wasabi#method-printergood-printerfail-printerwarn-printerinfo), they are calling `wrap` internally, and there's no easy way to adjust the line width. The [Printer](https://github.com/ines/wasabi#class-printer) class does have a `line_max` argument, but it's only used for dividers.

Can there be a way to adjust the default `wrap_max` value, either by configuring a `Printer` instance or via an environment variable? I'm using wasabi in my spaCy related projects, and the short 80 character output has been really limiting some of my logging output.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.