jquast / blessed

Blessed is an easy, practical library for making python terminal apps
http://pypi.python.org/pypi/blessed
MIT License
1.18k stars 71 forks source link

Update terminal.py #231

Closed mwchase closed 2 years ago

mwchase commented 2 years ago

Attempt to make pylint happy with the kwargs documentation.

This line broke my other PR, so if this passes, it should be good.

codecov[bot] commented 2 years ago

Codecov Report

Merging #231 (1ae14c4) into master (08417d6) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #231   +/-   ##
=======================================
  Coverage   95.36%   95.36%           
=======================================
  Files           9        9           
  Lines        1014     1014           
  Branches      176      176           
=======================================
  Hits          967      967           
  Misses         43       43           
  Partials        4        4           
Impacted Files Coverage Δ
blessed/terminal.py 98.25% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 08417d6...1ae14c4. Read the comment docs.

avylove commented 2 years ago

I think pydocstyle wants to start the docstring with r""" if it has backslashes. Looking at the documentation produced, Sphinx wants a single backslash. I think there is a bug in Pylint that isn't removing the escapes before comparing the strings. Worth reaching out to them with an issue to see if it's a quick fix. If not, we may just need to ignore this error.

mwchase commented 2 years ago

Sorry about the obvious failure. I was being a little lazy, and just doing these updates through the web interface. (They seemed so simple, but I guess not.)

mwchase commented 2 years ago

Just confirmed locally that Sphinx does not like having the backslash removed. I investigated on the pylint side, and it looks like this is https://github.com/PyCQA/pylint/issues/5406.

Thinking about what to do in terms of getting things to pass, my inclination would be to revert the changes to the docstring, and either version-lock pylint below 2.12, or add inline disables to the function definition, though I'm happy to do whatever. Any preferences?

avylove commented 2 years ago

I don't think we're in a hurry. Let's see what the Pylint guys say. They tend to fix things like this pretty quickly. If it becomes a blocker we'll just inline disable that check, but we can hold off for now.

mwchase commented 2 years ago

I just confirmed that the new pylint release passes accepts these changes, so this should be good to try again whenever.