mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

Line numbers in error messages #132

Open analog-cbarber opened 2 years ago

analog-cbarber commented 2 years ago

I have seen errors like Failed to get 'name: description' pair from '', which even given the name of the docstring, can be hard to track down.

It would be really nice if every error message always included a line number.

It would be even better if all line numbers were reported as actual source lines using a format that IDEs will recognize so that you make. For instance, pylint will prefix each error with a <filepath>:<line#>:. It makes fixing errors MUCH easier for the user.

pawamoy commented 2 years ago

Again, nice idea, thanks @analog-cbarber!

Griffe should already behave better regarding line numbers in warnings. But I guess we can leave this open as a simple improvement/bugfix for the time pytkdocs will continue to be used in projects, through the legacy handler.