mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
commit
e217abd306
3 changed files with 32 additions and 2 deletions
24
news/superhelp.rst
Normal file
24
news/superhelp.rst
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
**Added:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Changed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Deprecated:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Removed:**
|
||||||
|
|
||||||
|
* <news item>
|
||||||
|
|
||||||
|
**Fixed:**
|
||||||
|
|
||||||
|
* Fixed a regession with xonsh superhelp ``??`` operator and ``which -v`` which showed Pythons builtin
|
||||||
|
doc strings.
|
||||||
|
|
||||||
|
**Security:**
|
||||||
|
|
||||||
|
* <news item>
|
|
@ -33,9 +33,11 @@ _func_call_docstring = LazyObject(
|
||||||
_object_init_docstring = LazyObject(
|
_object_init_docstring = LazyObject(
|
||||||
lambda: object.__init__.__doc__, globals(), "_object_init_docstring"
|
lambda: object.__init__.__doc__, globals(), "_object_init_docstring"
|
||||||
)
|
)
|
||||||
|
|
||||||
_builtin_type_docstrings = LazyObject(
|
_builtin_type_docstrings = LazyObject(
|
||||||
lambda: {
|
lambda: {
|
||||||
t.__doc__ for t in (types.ModuleType, types.MethodType, types.FunctionType)
|
inspect.getdoc(t)
|
||||||
|
for t in (types.ModuleType, types.MethodType, types.FunctionType, property)
|
||||||
},
|
},
|
||||||
globals(),
|
globals(),
|
||||||
"_builtin_type_docstrings",
|
"_builtin_type_docstrings",
|
||||||
|
|
|
@ -104,7 +104,11 @@ def print_alias(arg, stdout, verbose=False):
|
||||||
else:
|
else:
|
||||||
print(arg, file=stdout)
|
print(arg, file=stdout)
|
||||||
else:
|
else:
|
||||||
print("aliases['{}'] = {}".format(arg, builtins.aliases[arg]), file=stdout)
|
print(
|
||||||
|
"aliases['{}'] = {}".format(arg, builtins.aliases[arg]),
|
||||||
|
flush=True,
|
||||||
|
file=stdout,
|
||||||
|
)
|
||||||
if callable(builtins.aliases[arg]):
|
if callable(builtins.aliases[arg]):
|
||||||
builtins.__xonsh__.superhelp(builtins.aliases[arg])
|
builtins.__xonsh__.superhelp(builtins.aliases[arg])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue