`gh pr list` stderr is not captured by subprocess

gh pr list stderr is not captured by subprocess. I am not sure github cli gh has a special implementation of stderr.

(base) root@ip-172-26-1-210:# python -c "import subprocess;print(subprocess.run('gh pr list', shell=True, capture_output=True))"
CompletedProcess(args='gh pr list', returncode=0, stdout=b'', stderr=b'')
(base) root@ip-172-26-1-210:~/github# python --version
Python 3.10.10
(base) root@ip-172-26-1-210:~/github# gh pr list
no open pull requests in peterjpxie/github
(base) root@ip-172-26-1-210:~/github# gh pr list 2>a.txt
(base) root@ip-172-26-1-210:~/github# cat a.txt
no open pull requests in peterjpxie/github

Environment:
Ubuntu 20.04
Miniconda base env: Python 3.10.10

Maybe gh is detecting if you are on a tty device.
What happens if you do:

gh pr list </dev/null
gh pr list 2>&1 | cat
# gh pr list </dev/null
no open pull requests in peterjpxie/github
# gh pr list 2>&1 | cat
<no output>
#

That is what your subprocess call is doing.

As a machine interface I think its designed to only return pr info if there is some.
That makes your code simpler as you do not need to special case the no pr message.

Thanks, Barry!