Alir3z4 / Alir3z4/html2text

proposal - default bodywidth to `None`

オープン
#265 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
2.2k
フォーク
296
PR マージ指標
30日以内にマージされた PR はありません

説明

`bodywidth` is currently specified in an init argument, defaulting to `config.BODY_WIDTH`.

https://github.com/Alir3z4/html2text/blob/master/html2text/__init__.py#L43

A problem with this approach: the `__init__` function creates the default value for bodywidth when it is interpreted. changing the value of `config.BODY_WIDTH`after importing html2text will have no effect.

I propose the following:

1. change the init value `bodywidth=None`
2. change the following line:

```
- self.body_width = bodywidth # covered in cli
+ self.body_width = bodywidth if bodywidth is not None else config.BODY_WIDTH # covered in cli
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。