mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
More detailed proc proxy name (#5417)
When cls.f is partial it's better to show full specification. ## For community ⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment** --------- Co-authored-by: a <1@1.1> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e7f2489486
commit
948510e40a
1 changed files with 1 additions and 7 deletions
|
@ -8,7 +8,6 @@ licensed to the Python Software foundation under a Contributor Agreement.
|
|||
"""
|
||||
|
||||
import collections.abc as cabc
|
||||
import functools
|
||||
import io
|
||||
import os
|
||||
import signal
|
||||
|
@ -285,16 +284,11 @@ def parse_proxy_return(r, stdout, stderr):
|
|||
|
||||
|
||||
def get_proc_proxy_name(cls):
|
||||
func_name = cls.f
|
||||
if type(cls.f) is functools.partial:
|
||||
func_name = getattr(
|
||||
cls.f.args[0], "__name__", getattr(cls.f, "__name__", cls.f)
|
||||
)
|
||||
return repr(
|
||||
{
|
||||
"cls": cls.__class__.__name__,
|
||||
"name": getattr(cls, "name", None),
|
||||
"func": func_name,
|
||||
"func": cls.f,
|
||||
"alias": cls.env.get("__ALIAS_NAME", None),
|
||||
"pid": cls.pid,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue