`Distribution._show_help` documentation
According to its documentation, Distribution._show_help operates on its commands argument:
https://github.com/pypa/distutils/blob/38b58a5b3fc343aebdb08f46089049780de4dc44/distutils/dist.py#L624
https://github.com/pypa/distutils/blob/38b58a5b3fc343aebdb08f46089049780de4dc44/distutils/dist.py#L633-L635
However, I don't see commands used anywhere. Instead, I see Distribution._show_help iterate over its self.commands variable:
https://github.com/pypa/distutils/blob/38b58a5b3fc343aebdb08f46089049780de4dc44/distutils/dist.py#L658
Is it OK to get rid of the commands=[] argument and change the documentation accordingly? That won't change the current functionality.
Yes, probably.
Actually, _show_help() appears to be called with different command arguments on purpose:
https://github.com/pypa/distutils/blob/b7ee725f3a5ba336cfca89f55d8a3b7d3bf7d27b/distutils/dist.py#L488-L491
https://github.com/pypa/distutils/blob/b7ee725f3a5ba336cfca89f55d8a3b7d3bf7d27b/distutils/dist.py#L583-L585
The initial intention was to filter the commands or command class at call time. Instead, I suggest fixing _show_help() to operate on commands instead of self.commands.