|pywikibot/core||master||+51 -5||[doc] Improved doc string for logging.py function|
|pywikibot/core||master||+13 -2||Re-added the warning() documentation|
I clearly should have written a better bug report, because I can't reproduce the exact point ;-)
This is about the functions 'error' and 'exception' in https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/logging.py.
def output documents the meaning of the various parameters, but all of the other logging functions (def error, but also e.g. def warning, which was not mentioned in the bug title) are missing the extended documentation. That documentation should be added.
@Homeboy_445: pywikibot.logging has several output methods: output(), stdout(), warning(), error(), log(), critical(), debug() and also exception(). The doc strings might be improved, particulary the difference of error() and exception(). All functions are similar to the logging buildins: https://docs.python.org/3/library/logging.html?highlight=exception#logging.exception
@Xqt So do I have to enhance the documentation of pywikibot.logging particularly the error and the exception functions and their description is the same as the python docs and What do you mean by the difference between error() and exception() do I explicitly have to provide the actual difference between the error and exception or something else?
I think expanding the doc strings in logging.stdout, error, log, critical, debug and exception will solve it. Use logging.warning as a sample. Take care that logging.exception is different from the othes. In addition also be inspired from similar functions in https://docs.python.org/3/library/logging.html
Can't see any changes at your last patch https://gerrit.wikimedia.org/r/c/pywikibot/core/+/638097
So try the following steps:
- create a new patch at your current accidentally pushed patch
- rebase it onto master
- push it to gerrit repository
- switch/checkout to your current accidentally pushed
- fetch the old patch from gerrit repository
- cherry-pick FETCH_HEAD
- make the needed changes
- commit it and push it to gerrit