mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Merge pull request #3211 from xonsh/fix_DAP_completion
Add `__dir__` to `DynamicAccessProxy`
This commit is contained in:
commit
8576e9c22e
3 changed files with 29 additions and 1 deletions
24
news/fix_DAP_completion.rst
Normal file
24
news/fix_DAP_completion.rst
Normal file
|
@ -0,0 +1,24 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Added proxied ``__dir__`` method to ``DynamicAccessProxy`` to restore
|
||||
tab-completion for objects that use the proxy (especially ``events``)
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -13,7 +13,7 @@ import xonsh.main
|
|||
from xonsh.main import XonshMode
|
||||
from xonsh.environ import Env
|
||||
import pytest
|
||||
from tools import TEST_DIR
|
||||
from tools import TEST_DIR, skip_if_on_windows
|
||||
|
||||
|
||||
def Shell(*args, **kwargs):
|
||||
|
@ -132,6 +132,7 @@ def test_premain_timings_arg(shell):
|
|||
xonsh.main.premain(["--timings"])
|
||||
|
||||
|
||||
@skip_if_on_windows
|
||||
def test_xonsh_failback(shell, monkeypatch, monkeypatch_stderr):
|
||||
failback_checker = []
|
||||
|
||||
|
|
|
@ -1489,6 +1489,9 @@ class DynamicAccessProxy:
|
|||
def __call__(self, *args, **kwargs):
|
||||
return self.obj.__call__(*args, **kwargs)
|
||||
|
||||
def __dir__(self):
|
||||
return self.obj.__dir__()
|
||||
|
||||
|
||||
class DeprecationWarningProxy:
|
||||
"""Proxies access, but warns in the process."""
|
||||
|
|
Loading…
Add table
Reference in a new issue