dekshell 0.2.59__py3-none-any.whl → 0.2.62__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dekshell/core/contexts/methods.py +2 -1
- dekshell/core/contexts/properties.py +1 -1
- dekshell/core/markers/base/core.py +0 -33
- dekshell/core/markers/function.py +2 -1
- dekshell/core/markers/invoke.py +1 -1
- {dekshell-0.2.59.dist-info → dekshell-0.2.62.dist-info}/METADATA +2 -2
- {dekshell-0.2.59.dist-info → dekshell-0.2.62.dist-info}/RECORD +9 -9
- {dekshell-0.2.59.dist-info → dekshell-0.2.62.dist-info}/WHEEL +1 -1
- {dekshell-0.2.59.dist-info → dekshell-0.2.62.dist-info}/entry_points.txt +0 -0
|
@@ -32,13 +32,14 @@ from dektools.download import download_from_http
|
|
|
32
32
|
from dektools.ps.process import process_print_all, process_print_detail, process_detail, process_query, process_username
|
|
33
33
|
from dektools.time import now
|
|
34
34
|
from dektools.str import shlex_split, shlex_quote, str_split, split_table_line
|
|
35
|
+
from dektools.py import get_inner_vars
|
|
35
36
|
from dektools.format import format_duration
|
|
36
37
|
from dektools.shell import shell_wrapper, is_user_admin, shell_timeout, shell_retry, shell_command
|
|
37
38
|
from dektools.match import GeneralMatcher, glob2re, glob_compile, glob_match
|
|
38
39
|
from dektools.cmd.git import git_parse_modules, git_clean_dir, git_fetch_min, git_remove_tag, git_latest_tag, \
|
|
39
40
|
git_list_remotes, git_apply, git_head
|
|
40
41
|
from ...utils.beep import sound_notify
|
|
41
|
-
from ..markers.base.core import MarkerBase
|
|
42
|
+
from ..markers.base.core import MarkerBase
|
|
42
43
|
from ..markers.invoke import InvokeMarker, GotoMarker, ImportMarker
|
|
43
44
|
from ..redirect import search_bin_by_path_tree
|
|
44
45
|
|
|
@@ -13,12 +13,12 @@ from dektools.module import ModuleProxy
|
|
|
13
13
|
from dektools.time import DateTime
|
|
14
14
|
from dektools.file import read_text
|
|
15
15
|
from dektools.env import is_on_cicd
|
|
16
|
+
from dektools.py import get_inner_vars
|
|
16
17
|
from dektools.ps.process import process_attrs
|
|
17
18
|
from dektools.context.utils import Method, MethodSimple, AttrProxy
|
|
18
19
|
from dektools.web.url import Url
|
|
19
20
|
from ...utils.serializer import serializer
|
|
20
21
|
from ..redirect import shell_name
|
|
21
|
-
from ..markers.base.core import get_inner_vars
|
|
22
22
|
|
|
23
23
|
current_shell = shutil.which(shell_name, path=get_paths()['scripts'])
|
|
24
24
|
current_os = extra_platforms_current_os()
|
|
@@ -7,39 +7,6 @@ from dektools.typing import NoneType
|
|
|
7
7
|
from . import MarkerBase, TransformerMarker, ExitException, QuitContextException
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
def get_inner_vars(*var_name_list, full=True):
|
|
11
|
-
def walk(attr):
|
|
12
|
-
depth = 1
|
|
13
|
-
while True:
|
|
14
|
-
try:
|
|
15
|
-
frame = sys._getframe(depth)
|
|
16
|
-
except ValueError:
|
|
17
|
-
return
|
|
18
|
-
scope = getattr(frame, attr)
|
|
19
|
-
for i, name in enumerate(var_name_list):
|
|
20
|
-
if result[i] is unset:
|
|
21
|
-
if name in scope:
|
|
22
|
-
result[i] = scope[name]
|
|
23
|
-
if not list_unset():
|
|
24
|
-
break
|
|
25
|
-
depth += 1
|
|
26
|
-
|
|
27
|
-
def list_unset():
|
|
28
|
-
return [var_name_list[i] for i, x in enumerate(result) if x is unset]
|
|
29
|
-
|
|
30
|
-
unset = object()
|
|
31
|
-
result = [unset] * len(var_name_list)
|
|
32
|
-
walk('f_globals')
|
|
33
|
-
if full and list_unset():
|
|
34
|
-
walk('f_locals')
|
|
35
|
-
lu = list_unset()
|
|
36
|
-
if lu:
|
|
37
|
-
raise ValueError(f"Can't find: {lu}")
|
|
38
|
-
if len(result) == 1:
|
|
39
|
-
return result[0]
|
|
40
|
-
return tuple(result)
|
|
41
|
-
|
|
42
|
-
|
|
43
10
|
class MarkerContext:
|
|
44
11
|
def __init__(self, parent=None):
|
|
45
12
|
self.variables = parent.variables.derive() if parent else MapChainContext()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from dektools.dict import assign_list
|
|
2
|
+
from dektools.py import get_inner_vars
|
|
2
3
|
from .base import MarkerBase, MarkerWithEnd, MarkerNoTranslator, cmd_call_prefix, cmd_call_prefix_simple
|
|
3
|
-
from .base.core import QuitContext
|
|
4
|
+
from .base.core import QuitContext
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
class CallMarker(MarkerNoTranslator):
|
dekshell/core/markers/invoke.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dekshell
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.62
|
|
4
4
|
Author-Email: sanzenwin <sanzenwin@gmail.com>
|
|
5
5
|
License: MIT
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
7
|
Requires-Dist: packaging<=23.1
|
|
8
8
|
Requires-Dist: extra-platforms<=3.1.0
|
|
9
9
|
Requires-Dist: dektools[date,fetch,ignore,ps,tab]<1.0.0
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
dekshell-0.2.
|
|
2
|
-
dekshell-0.2.
|
|
3
|
-
dekshell-0.2.
|
|
1
|
+
dekshell-0.2.62.dist-info/METADATA,sha256=jMf-3O7Z5fFsSnrP-Ny_cWou3MUaOY9ew1VEn70gnuY,573
|
|
2
|
+
dekshell-0.2.62.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
dekshell-0.2.62.dist-info/entry_points.txt,sha256=d-kbfULiUTZWIBBsrQF3J_-wESncF-4K2rwHT08grlI,75
|
|
4
4
|
dekshell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
dekshell/click/__entry__.py,sha256=CMuxUzXoEe4TcHFZwv-MNFwHnu1HSZCDpXFpqQ814uM,42
|
|
6
6
|
dekshell/click/__init__.py,sha256=r-AHdO9CEEVvTN20-8Jozr6Zh8XSv_BnktYRwrlhtrE,2046
|
|
7
7
|
dekshell/core/__init__.py,sha256=isDEKwk1odLdvTQNCILCtVNBuXp1uFVPz_uTDNihkVU,5547
|
|
8
8
|
dekshell/core/contexts/__init__.py,sha256=oBZhmXtSoOBgZPAHu6wiMCCW-yIdkC5mqSXqbvKYUy4,490
|
|
9
|
-
dekshell/core/contexts/methods.py,sha256=
|
|
10
|
-
dekshell/core/contexts/properties.py,sha256=
|
|
9
|
+
dekshell/core/contexts/methods.py,sha256=hHdVBOqD3tGUI0oNEJNP_E6Ndg_H8fzJBLMp7c-wGko,12362
|
|
10
|
+
dekshell/core/contexts/properties.py,sha256=1FjP3a_2VkI7gx5-WVIn3nwHBZh_st85gXBI9-Y0PSQ,3357
|
|
11
11
|
dekshell/core/markers/__init__.py,sha256=1oq4wlBOJV56hsshPe0ZZZMvoItCV2Xs2RN08HTrbiY,2255
|
|
12
12
|
dekshell/core/markers/base/__init__.py,sha256=CHD9vb8yGjnALimCwZJ2refbPB7zAE4FgQKLoRwzLrE,18037
|
|
13
|
-
dekshell/core/markers/base/core.py,sha256=
|
|
13
|
+
dekshell/core/markers/base/core.py,sha256=fBiyO8bxr2NC65FBc5myxkNqLvS9evRJRwxCHYaUlU4,11642
|
|
14
14
|
dekshell/core/markers/base/shell.py,sha256=fiFsTUDI8pSDDUCk834OI4ajri2qNWFJkLVhmUk2uAs,484
|
|
15
15
|
dekshell/core/markers/commands.py,sha256=mDRj4dSfKbDaZ_ts4lPXd6wftvGFI4VKkRoIzxV7otA,1696
|
|
16
16
|
dekshell/core/markers/comment.py,sha256=rBzxcyvTv7qgy5jc0NWT4pi5M7xEf9Wwa2mv96kJ0gc,1030
|
|
@@ -20,10 +20,10 @@ dekshell/core/markers/empty.py,sha256=pWKsHlrp6uXWU6blqOs0IgN_3kYm1OmDQiKGPERabA
|
|
|
20
20
|
dekshell/core/markers/env.py,sha256=hU6irauFrvsUgK9j6jifosiMn0b6mt3aOf5t9oKhxS4,1160
|
|
21
21
|
dekshell/core/markers/exec.py,sha256=BUNSgZh5WyE7wY6M-5zPvebdnWrdkQKSlDEhSgrY8gk,3395
|
|
22
22
|
dekshell/core/markers/for_.py,sha256=wQnK3-o0dQl4A2wx8xgs6V2dzgEjEbnt4MML2fh2x8U,2148
|
|
23
|
-
dekshell/core/markers/function.py,sha256=
|
|
23
|
+
dekshell/core/markers/function.py,sha256=eUobnt-pcZhHzpp3JRkJn2ie8KO_VEubYDeoatEkOzw,3873
|
|
24
24
|
dekshell/core/markers/if_.py,sha256=UqEnR0X9bKO7hEKol3MJNWXvP7fuJAGt8zwk3xlBCuk,1118
|
|
25
25
|
dekshell/core/markers/input.py,sha256=94SWaeLnwtxRdIn9Ck0IxMZL6vOXVCedUmsp5IPAwWo,1188
|
|
26
|
-
dekshell/core/markers/invoke.py,sha256=
|
|
26
|
+
dekshell/core/markers/invoke.py,sha256=Tei83qB5wjMFPeVMaqTxLzsHhU5c1NEE2E8rkPPf69U,1976
|
|
27
27
|
dekshell/core/markers/pip_.py,sha256=F_l7sKxAdPBPsEfRTD8wo5cJLy3N9FGQHLD2nv29yiM,638
|
|
28
28
|
dekshell/core/markers/redirect.py,sha256=-w_qhdaHa1hIi-LjCmXpaYKZWrTitAiSawjEf8qjYt4,1989
|
|
29
29
|
dekshell/core/markers/shell.py,sha256=43BDAAzMdmgZmemkW5buh_w4LL1GDGw-s9fNZo6vhag,1929
|
|
@@ -37,4 +37,4 @@ dekshell/utils/cmd.py,sha256=K9FbXgHcGFchHA58xI0_t4YK4yb8XkWbxsNoztYRx3Y,518
|
|
|
37
37
|
dekshell/utils/pkg.py,sha256=TgYqRqawoJfjkxt6UAHnp9ttmpjuHiWRFbqxADOS1VE,1337
|
|
38
38
|
dekshell/utils/serializer.py,sha256=aIdF2Wzo-qHmIshv46jn1XD0X66vQ1JFdU-g3ZFbH2w,386
|
|
39
39
|
dekshell/utils/shell.py,sha256=0NoA2-SOOMinbmZZipwzL-npBbzPOdWEfdPVYqq5G5g,92
|
|
40
|
-
dekshell-0.2.
|
|
40
|
+
dekshell-0.2.62.dist-info/RECORD,,
|
|
File without changes
|