Open 098799 opened 4 years ago
Most of the init arguments in the HTML2Text class are hardcoded in constants and modifiable only by the cli, not through the library usage.
I consider that as a problem, but the approach doesn't look clean to me, regardless of of how mypy works with it, the code has become harder to read, especially when setattr is being used here.
The code would be much easier to read when it's explicit and easily being able to follow.
Hey @Alir3z4, thanks for the reply. If you prefer, I can keep the current structure and replicate the big list once again in the kwargs of __init__
. Would you prefer that solution?
Most of the init arguments in the
HTML2Text
class are hardcoded in constants and modifiable only by the cli, not through the library usage. This adds the possibility to pass kwargs through the function callhtml2text
or class init.Please note that the commit contains syntax that is not recognizable by
mypy
, but is correct. Note: https://github.com/python/mypy/issues/5719