kash-shell 0.3.18__py3-none-any.whl → 0.3.21__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.
- kash/actions/core/{markdownify.py → markdownify_html.py} +3 -6
- kash/commands/workspace/workspace_commands.py +10 -88
- kash/config/colors.py +8 -6
- kash/config/text_styles.py +2 -0
- kash/docs/markdown/topics/a1_what_is_kash.md +1 -1
- kash/docs/markdown/topics/b1_kash_overview.md +34 -45
- kash/exec/__init__.py +3 -0
- kash/exec/action_decorators.py +20 -5
- kash/exec/action_exec.py +2 -2
- kash/exec/{fetch_url_metadata.py → fetch_url_items.py} +42 -14
- kash/exec/llm_transforms.py +1 -1
- kash/exec/shell_callable_action.py +1 -1
- kash/file_storage/file_store.py +7 -1
- kash/file_storage/store_filenames.py +4 -0
- kash/help/function_param_info.py +1 -1
- kash/help/help_pages.py +1 -1
- kash/help/help_printing.py +1 -1
- kash/llm_utils/llm_completion.py +1 -1
- kash/model/actions_model.py +6 -0
- kash/model/items_model.py +18 -3
- kash/shell/output/shell_output.py +15 -0
- kash/utils/api_utils/api_retries.py +305 -0
- kash/utils/api_utils/cache_requests_limited.py +84 -0
- kash/utils/api_utils/gather_limited.py +987 -0
- kash/utils/api_utils/progress_protocol.py +299 -0
- kash/utils/common/function_inspect.py +66 -1
- kash/utils/common/parse_docstring.py +347 -0
- kash/utils/common/testing.py +10 -7
- kash/utils/rich_custom/multitask_status.py +631 -0
- kash/utils/text_handling/escape_html_tags.py +16 -11
- kash/utils/text_handling/markdown_render.py +1 -0
- kash/web_content/web_extract.py +34 -15
- kash/web_content/web_page_model.py +10 -1
- kash/web_gen/templates/base_styles.css.jinja +26 -20
- kash/web_gen/templates/components/toc_styles.css.jinja +1 -1
- kash/web_gen/templates/components/tooltip_scripts.js.jinja +171 -19
- kash/web_gen/templates/components/tooltip_styles.css.jinja +23 -8
- {kash_shell-0.3.18.dist-info → kash_shell-0.3.21.dist-info}/METADATA +4 -2
- {kash_shell-0.3.18.dist-info → kash_shell-0.3.21.dist-info}/RECORD +42 -37
- kash/help/docstring_utils.py +0 -111
- {kash_shell-0.3.18.dist-info → kash_shell-0.3.21.dist-info}/WHEEL +0 -0
- {kash_shell-0.3.18.dist-info → kash_shell-0.3.21.dist-info}/entry_points.txt +0 -0
- {kash_shell-0.3.18.dist-info → kash_shell-0.3.21.dist-info}/licenses/LICENSE +0 -0
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
z-index: 1000;
|
|
63
63
|
|
|
64
64
|
/* Tooltip styling - matching TOC active item */
|
|
65
|
-
background: var(--color-bg-
|
|
65
|
+
background: var(--color-bg-meta-solid);
|
|
66
66
|
border: 1px solid var(--color-border-hint);
|
|
67
67
|
border-left: 2px solid var(--color-primary);
|
|
68
|
-
color: var(--color-
|
|
68
|
+
color: var(--color-text);
|
|
69
69
|
font-family: var(--font-sans);
|
|
70
70
|
font-size: var(--font-size-small);
|
|
71
71
|
line-height: 1.4;
|
|
@@ -104,11 +104,6 @@
|
|
|
104
104
|
pointer-events: auto;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/* Tooltip hover state */
|
|
108
|
-
.tooltip-element:hover {
|
|
109
|
-
background: var(--color-hover-bg);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
107
|
/* -----------------------------------------------------------------------------
|
|
113
108
|
General Tooltip Positioning - Using margin variables
|
|
114
109
|
----------------------------------------------------------------------------- */
|
|
@@ -323,7 +318,7 @@
|
|
|
323
318
|
|
|
324
319
|
/* Footnote reference styling */
|
|
325
320
|
.footnote-ref a[data-tooltip-trigger] {
|
|
326
|
-
transition: color 0.
|
|
321
|
+
transition: color 0.2s ease-in-out;
|
|
327
322
|
}
|
|
328
323
|
|
|
329
324
|
.footnote-ref a[data-tooltip-trigger]:hover {
|
|
@@ -367,6 +362,16 @@
|
|
|
367
362
|
display: none;
|
|
368
363
|
}
|
|
369
364
|
|
|
365
|
+
/* But show our navigation footnote link */
|
|
366
|
+
.footnote-element .footnote-nav-container .footnote {
|
|
367
|
+
display: inline;
|
|
368
|
+
text-decoration: none !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.footnote-element .footnote-nav-container .footnote:hover {
|
|
372
|
+
text-decoration: none !important;
|
|
373
|
+
}
|
|
374
|
+
|
|
370
375
|
/* Text breaking rules for all tooltips */
|
|
371
376
|
.tooltip-element .force-break,
|
|
372
377
|
.tooltip-element code,
|
|
@@ -479,4 +484,14 @@
|
|
|
479
484
|
.tooltip-element:not(.tooltip-mobile-bottom) {
|
|
480
485
|
max-width: min(var(--tooltip-max-width), calc(100vw - 2rem)) !important;
|
|
481
486
|
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* -----------------------------------------------------------------------------
|
|
490
|
+
Footnote Navigation Button Styles
|
|
491
|
+
----------------------------------------------------------------------------- */
|
|
492
|
+
|
|
493
|
+
/* Container for footnote navigation link */
|
|
494
|
+
.footnote-nav-container {
|
|
495
|
+
float: right;
|
|
496
|
+
margin-left: 0.5rem;
|
|
482
497
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kash-shell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.21
|
|
4
4
|
Summary: The knowledge agent shell (core)
|
|
5
5
|
Project-URL: Repository, https://github.com/jlevy/kash-shell
|
|
6
6
|
Author-email: Joshua Levy <joshua@cal.berkeley.edu>
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
Requires-Python: <4.0,>=3.11
|
|
19
|
+
Requires-Dist: aiolimiter>=1.2.1
|
|
19
20
|
Requires-Dist: anyio>=4.8.0
|
|
20
21
|
Requires-Dist: audioop-lts>=0.2.1; python_version >= '3.13'
|
|
21
22
|
Requires-Dist: cachetools>=5.5.2
|
|
@@ -50,6 +51,7 @@ Requires-Dist: pydantic>=2.10.6
|
|
|
50
51
|
Requires-Dist: pydub>=0.25.1
|
|
51
52
|
Requires-Dist: pygments>=2.19.1
|
|
52
53
|
Requires-Dist: pyperclip>=1.9.0
|
|
54
|
+
Requires-Dist: pyrate-limiter>=3.7.0
|
|
53
55
|
Requires-Dist: python-dotenv>=1.0.1
|
|
54
56
|
Requires-Dist: python-magic-bin>=0.4.14; platform_system == 'Windows'
|
|
55
57
|
Requires-Dist: python-magic>=0.4.27; platform_system == 'Linux' or platform_system == 'Darwin'
|
|
@@ -115,7 +117,7 @@ the Python framework, a few core utilities, and the Kash command-line shell.
|
|
|
115
117
|
Additional actions for handling more complex tasks like converting documents and
|
|
116
118
|
transcribing, researching, or annotating videos, are in the
|
|
117
119
|
[kash-docs](https://github.com/jlevy/kash-docs) and
|
|
118
|
-
[kash-media](https://github.com/jlevy/kash-
|
|
120
|
+
[kash-media](https://github.com/jlevy/kash-media) packages, all available on PyPI and
|
|
119
121
|
quick to install via uv.
|
|
120
122
|
|
|
121
123
|
### Key Concepts
|
|
@@ -4,7 +4,7 @@ kash/actions/__init__.py,sha256=a4pQw8O-Y3q5N4Qg2jUV0xEZLX6d164FQhZ6zizY9fE,1357
|
|
|
4
4
|
kash/actions/core/assistant_chat.py,sha256=28G20cSr7Z94cltouTPve5TXY3km0lACrRvpLE27fK8,1837
|
|
5
5
|
kash/actions/core/chat.py,sha256=yCannBFa0cSpR_in-XSSuMm1x2ZZQUCKmlqzhsUfpOo,2696
|
|
6
6
|
kash/actions/core/format_markdown_template.py,sha256=ZJbtyTSypPo2ewLiGRSyIpVf711vQMhI_-Ng-FgCs80,2991
|
|
7
|
-
kash/actions/core/
|
|
7
|
+
kash/actions/core/markdownify_html.py,sha256=RXsC59rhDoLssRujkS32PETN1zzncIofFO7J3qTrnJc,1277
|
|
8
8
|
kash/actions/core/minify_html.py,sha256=99r3SjpI2NQP7e5MnMixAiT5lxPx7t2nyJvJi6Yps6w,1365
|
|
9
9
|
kash/actions/core/readability.py,sha256=ljdB2rOpzfKU2FpEJ2UELIzcdOAWvdUjFsxoHRTE3xo,989
|
|
10
10
|
kash/actions/core/render_as_html.py,sha256=CIPGKCjUEVNsnXmpqHCUnjGwTfEfOyCXxlYFUN8mahY,1870
|
|
@@ -35,10 +35,10 @@ kash/commands/help/help_commands.py,sha256=eJTpIhXck123PAUq2k-D3Q6UL6IQ8atOVYurL
|
|
|
35
35
|
kash/commands/help/logo.py,sha256=W8SUach9FjoTqpHZwTGS582ry4ZluxbBp86ZCiAtDkY,3505
|
|
36
36
|
kash/commands/help/welcome.py,sha256=F4QBgj3e1dM9Pf0H4TSzCrkVfXQVKUIl0b6Qmofbdo4,905
|
|
37
37
|
kash/commands/workspace/selection_commands.py,sha256=nZzA-H7Pk8kqSJVRlX7j1m6cZX-e0X8isOryDU41vqU,8156
|
|
38
|
-
kash/commands/workspace/workspace_commands.py,sha256=
|
|
38
|
+
kash/commands/workspace/workspace_commands.py,sha256=_2TcthGOu-nU9E_-jjf4kba9ldLRA6qe6Do6zV06EKc,21960
|
|
39
39
|
kash/config/__init__.py,sha256=ytly9Typ1mWV4CXfV9G3CIPtPQ02u2rpZ304L3GlFro,148
|
|
40
40
|
kash/config/capture_output.py,sha256=ud3uUVNuDicHj3mI_nBUBO-VmOrxtBdA3z-I3D1lSCU,2398
|
|
41
|
-
kash/config/colors.py,sha256=
|
|
41
|
+
kash/config/colors.py,sha256=osHrR1rLrFV5j2kTdN4z-DDM-HmbnBfMaOj4NiBdFzg,13527
|
|
42
42
|
kash/config/env_settings.py,sha256=uhCdfs9-TzJ15SzbuIQP1yIORaLUqYXCxh9qq_Z8cJc,996
|
|
43
43
|
kash/config/init.py,sha256=aE4sZ6DggBmmoZEx9C5mQKrEbcDiswX--HF7pfCFKzc,526
|
|
44
44
|
kash/config/lazy_imports.py,sha256=MCZXLnKvNyfHi0k7MU5rNwcdJtUF28naCixuogsAOAA,805
|
|
@@ -49,7 +49,7 @@ kash/config/server_config.py,sha256=eQ1yxDk031QI0Efp0I1VetqQd9wG7MrLVBCHFm4gp2g,
|
|
|
49
49
|
kash/config/settings.py,sha256=P3g0RSR6vrvfovDDYOIx6Hxafrg1mYTAxrTiVgH2Tm4,8889
|
|
50
50
|
kash/config/setup.py,sha256=zFxfTPG1cbsozuwUkIyAYebxuHhpYCiaexHnYnYJG1c,3524
|
|
51
51
|
kash/config/suppress_warnings.py,sha256=yty5ZodMLIpmjphRtcVmRamXfiWbyfga9annve6qxb0,1475
|
|
52
|
-
kash/config/text_styles.py,sha256=
|
|
52
|
+
kash/config/text_styles.py,sha256=QCidaUPRbelZjBnI6Q_Dtw-g_4VHdr99g4KHvDyQAo4,13810
|
|
53
53
|
kash/docs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
kash/docs/all_docs.py,sha256=NutfgU8VOA7_K2HX18FoOHVvvLL14dALoCxK9qDbQ04,3157
|
|
55
55
|
kash/docs/load_actions_info.py,sha256=D9uv8gdBtkBmdbFZeyIigsupPF9_WfidHVwWQrlggI0,937
|
|
@@ -61,13 +61,13 @@ kash/docs/markdown/assistant_instructions_template.md,sha256=Fzeledd_nr3bKhvQ1qZ
|
|
|
61
61
|
kash/docs/markdown/readme_template.md,sha256=iGx9IjSni1t_9BuYD5d2GgkxkNIkqvE3k78IufHF6Yg,409
|
|
62
62
|
kash/docs/markdown/warning.md,sha256=bG0T3UFqAkzF8217J8AbIbQ7ftJ_GKMRilIGq9eLdYc,162
|
|
63
63
|
kash/docs/markdown/welcome.md,sha256=yp_tmGXGIb8043ZDIL97Q1uaKVys7-ArHCprgDlon7w,611
|
|
64
|
-
kash/docs/markdown/topics/a1_what_is_kash.md,sha256=
|
|
64
|
+
kash/docs/markdown/topics/a1_what_is_kash.md,sha256=rgVrv6tRXEwdqQ54DAfHP3BSAuq8Ux4wCNeluTwpkhU,6758
|
|
65
65
|
kash/docs/markdown/topics/a2_installation.md,sha256=DSzaniHjOYPC3soGLPTGOGDVvbiPTROtb3S8zYUCPEs,5736
|
|
66
66
|
kash/docs/markdown/topics/a3_getting_started.md,sha256=xOMevEXMIpVJvTGuuwI9Cc9sun3tQM3OqCgynSgMpeM,9376
|
|
67
67
|
kash/docs/markdown/topics/a4_elements.md,sha256=XNJRw-iqnytiIHOAshp1YnUpHM5KBgFAhuOdp_fekxQ,4615
|
|
68
68
|
kash/docs/markdown/topics/a5_tips_for_use_with_other_tools.md,sha256=VGUdq8dm78E8PFbNR9BmV8Gj-r8zP-vOQz8TibQmGw0,3259
|
|
69
69
|
kash/docs/markdown/topics/b0_philosophy_of_kash.md,sha256=ADtgbvv756vKrJPhdvNGVzJVedOgo6ak7_vGEEFi8Sc,8749
|
|
70
|
-
kash/docs/markdown/topics/b1_kash_overview.md,sha256=
|
|
70
|
+
kash/docs/markdown/topics/b1_kash_overview.md,sha256=W-ctjXpLdhZhkW9Qnl5PpnbUbL_pLDQ9GN-KyHvhAdo,9255
|
|
71
71
|
kash/docs/markdown/topics/b2_workspace_and_file_formats.md,sha256=DsiDjAe8FSIf18OjkPq-ttbhkpQO4c1UBVjcK2iy-BM,2845
|
|
72
72
|
kash/docs/markdown/topics/b3_modern_shell_tool_recommendations.md,sha256=F-0mhSl7sm6mpTx17N4OaGn8DobTY6d9P0TjTsPqluI,2258
|
|
73
73
|
kash/docs/markdown/topics/b4_faq.md,sha256=ofLMC1JxdWAMZkiUzyhJTewBhEti8ULEF8yOTViZZLA,7093
|
|
@@ -81,45 +81,44 @@ kash/docs_base/recipes/tldr_standard_commands.sh,sha256=7nPES55aT45HF3eDhQRrEUiW
|
|
|
81
81
|
kash/embeddings/cosine.py,sha256=QTWPWUHivXjxCM6APSqij_-4mywM2BVVm0xb0hu7FHA,1587
|
|
82
82
|
kash/embeddings/embeddings.py,sha256=v6RmrEHsx5PuE3fPrY15RK4fgW0K_VlNWDTjCVr11zY,4451
|
|
83
83
|
kash/embeddings/text_similarity.py,sha256=BOo9Vcs5oi2Zs5La56uTkPMHo65XSd4qz_yr6GTfUA4,1924
|
|
84
|
-
kash/exec/__init__.py,sha256=
|
|
85
|
-
kash/exec/action_decorators.py,sha256=
|
|
86
|
-
kash/exec/action_exec.py,sha256=
|
|
84
|
+
kash/exec/__init__.py,sha256=Najls8No143yoj_KAaOQgo8ufC2LWCB_DwwEQ-8nDM0,1277
|
|
85
|
+
kash/exec/action_decorators.py,sha256=kCEqQFN1MIhRbFeIEGux956LzsiwonhyIIrJ8Pq9zPk,16765
|
|
86
|
+
kash/exec/action_exec.py,sha256=O_4UB_Vt7QRxltviMeBwNIfw9ten06n4fQ39MregacE,19017
|
|
87
87
|
kash/exec/action_registry.py,sha256=numU9pH_W5RgIrYmfi0iYMYy_kLJl6vup8PMrhxAfdc,2627
|
|
88
88
|
kash/exec/combiners.py,sha256=AJ6wgPUHsmwanObsUw64B83XzU26yuh5t4l7igLn82I,4291
|
|
89
89
|
kash/exec/command_exec.py,sha256=zc-gWm7kyB5J5Kp8xhULQ9Jj9AL927KkDPXXk-Yr1Bw,1292
|
|
90
90
|
kash/exec/command_registry.py,sha256=1s2ogU8b8nqK_AEtslbr1eYrXCGDkeT30UrB7L0BRoM,2027
|
|
91
|
-
kash/exec/
|
|
91
|
+
kash/exec/fetch_url_items.py,sha256=UUj3wrP3adzZHV_Icx7zSB9zRtl0S7EC54Ios8fuvbg,4404
|
|
92
92
|
kash/exec/history.py,sha256=l2XwHGBR1UgTGSFPSBE9mltmxvjR_5qFFO6d-Z008nc,1208
|
|
93
93
|
kash/exec/importing.py,sha256=xunmBapeUMNc6Zox7y6e_DZkidyWeouiFZpphajwSzc,1843
|
|
94
|
-
kash/exec/llm_transforms.py,sha256=
|
|
94
|
+
kash/exec/llm_transforms.py,sha256=n7S-Dew8z_BoAwp-14lY4LueFeUtG117eK_8msbn02c,4375
|
|
95
95
|
kash/exec/precondition_checks.py,sha256=HymxL7qm4Yz8V76Um5pKdIRnQ2N-p9rpQQi1fI38bNA,2139
|
|
96
96
|
kash/exec/precondition_registry.py,sha256=9O-01d2OrsYLuhqodVuWjouLR2ABJbUotAmfJNBCRzs,1439
|
|
97
97
|
kash/exec/preconditions.py,sha256=6bJ76AVFo0TLoykrGBNB0rrpIDWD0umfb3F5sMcmoKo,5131
|
|
98
98
|
kash/exec/resolve_args.py,sha256=gu65epzVrwWHdHA-KwAwYssncJIB84oHOJeoXXrQ2mM,4428
|
|
99
99
|
kash/exec/runtime_settings.py,sha256=aK6nGbZhKSIDVmV6AqV68hQkiaIGWnCiNzHtwwZ5V0w,3960
|
|
100
|
-
kash/exec/shell_callable_action.py,sha256=
|
|
100
|
+
kash/exec/shell_callable_action.py,sha256=iSv3w33oJbIenOI6s9v5cHU4gX2U9w7MIWc8jHgk6HE,4377
|
|
101
101
|
kash/exec_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
102
|
kash/exec_model/args_model.py,sha256=gquOD0msFA-5xhNU-3R5l8wlwyAMefpMHltpxrDlYGQ,2662
|
|
103
103
|
kash/exec_model/commands_model.py,sha256=iM8QhzA0tAas5OwF5liUfHtm45XIH1LcvCviuh3As7s,4923
|
|
104
104
|
kash/exec_model/script_model.py,sha256=1VG3LhkTmlKzHOYouZ92ZpOSKSCcsz3-tHNcFMQF788,5031
|
|
105
105
|
kash/exec_model/shell_model.py,sha256=LUhQivbpXlerM-DUzNY7BtctNBbn08Wto8CSSxQDxRU,568
|
|
106
106
|
kash/file_storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
|
-
kash/file_storage/file_store.py,sha256=
|
|
107
|
+
kash/file_storage/file_store.py,sha256=_OxcExZOQ-ef9Sm2sdD28BSMcQ64KsSikq3CJPUKYUU,30886
|
|
108
108
|
kash/file_storage/item_file_format.py,sha256=_o2CjWstk_Z__qMr-Inct9wJm2VEUK0GZvF-fDZ8bcc,5377
|
|
109
109
|
kash/file_storage/metadata_dirs.py,sha256=9AqO3S3SSY1dtvP2iLX--E4ui0VIzXttG8R040otfyg,3820
|
|
110
110
|
kash/file_storage/persisted_yaml.py,sha256=4-4RkFqdlBUkTOwkdA4vRKUywEE9TaDo13OGaDUyU9M,1309
|
|
111
111
|
kash/file_storage/store_cache_warmer.py,sha256=cQ_KwxkBPWT3lMmYOCTkXgo7CKaGINns2YzIH32ExSU,1013
|
|
112
|
-
kash/file_storage/store_filenames.py,sha256=
|
|
112
|
+
kash/file_storage/store_filenames.py,sha256=zvmVQxQy8QOHkUeh-6iFKlBSk0GzqUt9xmmqkh45Zdo,1909
|
|
113
113
|
kash/help/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
114
|
kash/help/assistant.py,sha256=R0XHNi-h51QoQ7rGouD2chrDPGomYaPQUqJdvpjlCs8,11535
|
|
115
115
|
kash/help/assistant_instructions.py,sha256=jW5XAsmLx8YZMKSDJgWnqo9Vwe7VuiTURQHjKBqr_L8,2549
|
|
116
116
|
kash/help/assistant_output.py,sha256=9sM-OVLc6eMSOkxyovB88dNlsknFpf8Wz89Zp5PuEA8,1668
|
|
117
|
-
kash/help/
|
|
118
|
-
kash/help/function_param_info.py,sha256=IVi6dtRjAWUCxpy9rZ1fRqKLCciK_kuMybTwCZ9XiYg,1692
|
|
117
|
+
kash/help/function_param_info.py,sha256=yGuFLVZoDF1E1YsXqGwJhuY2uJB3R1B1EC77MEMSc-U,1700
|
|
119
118
|
kash/help/help_embeddings.py,sha256=le7yqxGOtzIU_LUkl-Ef-7WQGuWa0wAOx9umZGva8zg,2787
|
|
120
119
|
kash/help/help_lookups.py,sha256=0dtuLWEXncqhJCijC98IA9stBDNNcJewt1JYqMLkTx4,2029
|
|
121
|
-
kash/help/help_pages.py,sha256=
|
|
122
|
-
kash/help/help_printing.py,sha256=
|
|
120
|
+
kash/help/help_pages.py,sha256=TaKsE26R-pZTrK4Pa593DK5osdJodFHaVm5pZpjqgaI,3894
|
|
121
|
+
kash/help/help_printing.py,sha256=eZbZdyJC158JiXcEk2zvUmqYbYzbYOpHvxEhC1kIN-Q,6086
|
|
123
122
|
kash/help/help_types.py,sha256=xo0AXfaNjlMrWp6dkGixo6P61n1tIhFhlvv9sWhNBrI,7909
|
|
124
123
|
kash/help/recommended_commands.py,sha256=jqc3TjWFBqDJ-iSzXn8vTOplb4uHndwvdAGJfcUV_qs,2486
|
|
125
124
|
kash/help/tldr_help.py,sha256=bcu__MIF4vYlZEeqQqieGIBcRhNCTK5u8jPV08ObzCI,9654
|
|
@@ -129,7 +128,7 @@ kash/llm_utils/custom_sliding_transforms.py,sha256=z07WCdBoiywBIGk2EXK3xY4t_6g8I
|
|
|
129
128
|
kash/llm_utils/fuzzy_parsing.py,sha256=bbG2Y7i5w6kxAVPAixyluv3MDS2hW_pkhnJpVOLHZQc,3278
|
|
130
129
|
kash/llm_utils/init_litellm.py,sha256=5Fn9uW4P7lfEO8Rk1EJJUzDEGNjw-PDvxFgHlKDf-Ok,409
|
|
131
130
|
kash/llm_utils/llm_api_keys.py,sha256=nTB9wSFfHTOXvqshSQCQGCPxUwOW1U7oslngya8nHkw,1168
|
|
132
|
-
kash/llm_utils/llm_completion.py,sha256=
|
|
131
|
+
kash/llm_utils/llm_completion.py,sha256=HPgxFys8RZsenfKq2S2dkUrpu-A88xXb-xK578zNd2g,5439
|
|
133
132
|
kash/llm_utils/llm_features.py,sha256=tgcz8qQByZ80noybXS2144K9eCw1iOFxPYkCK2kJJOw,1861
|
|
134
133
|
kash/llm_utils/llm_messages.py,sha256=70QwIIvdwo-h4Jfn_6MbEHb3LTUjUmzg_v_dU_Ey__g,1174
|
|
135
134
|
kash/llm_utils/llm_names.py,sha256=VZbdKnoeBx_luB5YQ-Rz37gMt3_FcueJdp40ZaQbpUA,3620
|
|
@@ -159,13 +158,13 @@ kash/media_base/transcription_format.py,sha256=rOVPTpwvW22c27BRwYF-Tc_xzqK_wOtUZ
|
|
|
159
158
|
kash/media_base/transcription_whisper.py,sha256=GqvroW9kBAH4-gcbYkMgNCfs2MpMIgm1ip3NMWtJ0IE,1169
|
|
160
159
|
kash/media_base/services/local_file_media.py,sha256=_NV-T90rShJ8ucUjQXMPCKKJ50GSFE9PyyVzhXp5z9w,5624
|
|
161
160
|
kash/model/__init__.py,sha256=kFfBKb5N70NWYUfpRRxn_Sb9p_vXlB6BBaTCqWmSReo,2978
|
|
162
|
-
kash/model/actions_model.py,sha256=
|
|
161
|
+
kash/model/actions_model.py,sha256=nYvQNr2M8ooFRL2YZ3_yPxFuqYdxO__6fFTgx5mxwbQ,22269
|
|
163
162
|
kash/model/assistant_response_model.py,sha256=6eDfC27nyuBDFjv5nCYMa_Qb2mPbKwDzZy7uLOIyskI,2653
|
|
164
163
|
kash/model/compound_actions_model.py,sha256=HiDK5wwCu3WwZYHATZoLEguiqwR9V6V296wiKtGIX8s,6926
|
|
165
164
|
kash/model/concept_model.py,sha256=we2qOcy9Mv1q7XPfkDLp_CyO_-8DwAUfUYlpgy_jrFs,1011
|
|
166
165
|
kash/model/exec_model.py,sha256=IlfvtQyoFRRWhWju7vdXp9J-w_NGcGtL5DhDLy9gRd8,2250
|
|
167
166
|
kash/model/graph_model.py,sha256=jnctrPiBZ0xwAR8D54JMAJPanA1yZdaxSFQoIpe8anA,2662
|
|
168
|
-
kash/model/items_model.py,sha256=
|
|
167
|
+
kash/model/items_model.py,sha256=ZWAsqTHA4p6GSNz3QjPr46LRwY7pbv7d73_KqU3gsO0,35686
|
|
169
168
|
kash/model/language_list.py,sha256=I3RIbxTseVmPdhExQimimEv18Gmy2ImMbpXe0-_t1Qw,450
|
|
170
169
|
kash/model/llm_actions_model.py,sha256=a29uXVNfS2CiqvM7HPdC6H9A23rSQQihAideuBLMH8g,2110
|
|
171
170
|
kash/model/media_model.py,sha256=ZnlZ-FkswbAIGpUAuNqLce1WDZK-WbnwHn2ipg8x7-0,3511
|
|
@@ -191,7 +190,7 @@ kash/shell/output/kerm_code_utils.py,sha256=92A4AV-IFKKZMWLNZnd_zksNFMBgE_VNXySy
|
|
|
191
190
|
kash/shell/output/kerm_codes.py,sha256=KLVdTM_dL_NeYmGbllzsQoW4IHXJjEsgqqIp1s7P1yI,18877
|
|
192
191
|
kash/shell/output/kmarkdown.py,sha256=RRB5b0Ip0KZ71vnJKFfvxerYkeDFTCVTlHqHfmMy80Y,3675
|
|
193
192
|
kash/shell/output/shell_formatting.py,sha256=oxmAeJ2j0ANYSUsL15CUv--KcGlQ6Wa_rywXSDlsZM4,3331
|
|
194
|
-
kash/shell/output/shell_output.py,sha256=
|
|
193
|
+
kash/shell/output/shell_output.py,sha256=zrL4d3GosAloTgTNeBtfzo8yd6Z4rKrOZto2Anww398,11645
|
|
195
194
|
kash/shell/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
196
195
|
kash/shell/ui/shell_results.py,sha256=mvFHxK_oz3bNfF5_Twt6VqDO44TA1b256Bjf5oco804,4130
|
|
197
196
|
kash/shell/ui/shell_syntax.py,sha256=1fuDqcCV16AAWwWS4w4iT-tlSnl-Ywdrf68Ge8XIfmQ,751
|
|
@@ -200,17 +199,22 @@ kash/shell/utils/native_utils.py,sha256=pAiuqqrjfNTesdArSya6CVavKVsuAXOcX3_XAIQr
|
|
|
200
199
|
kash/shell/utils/shell_function_wrapper.py,sha256=fgUuVhocYMKLkGJJQJOER5nFMAvM0ZVpfGu7iJPJI9s,7385
|
|
201
200
|
kash/utils/__init__.py,sha256=4Jl_AtgRADdGORimWhYZwbSfQSpQ6SiexNIZzmbcngI,111
|
|
202
201
|
kash/utils/errors.py,sha256=2lPL0fxI8pPOiDvjl0j-rvwY8uhmWetsrYYIc2-x1WY,3906
|
|
202
|
+
kash/utils/api_utils/api_retries.py,sha256=0actlvQSP2puSvM7DwzC7eifDLAFYSRirNuo1Tp1Xvg,9040
|
|
203
|
+
kash/utils/api_utils/cache_requests_limited.py,sha256=TA5buZ9Dgbj4I1zHhwerTXre018i0TCACGsezsjX9Uc,3140
|
|
204
|
+
kash/utils/api_utils/gather_limited.py,sha256=nnaR2jdvDz5ut95K7ZJltfTGCVigo0Y1828iLKd4pVA,35781
|
|
205
|
+
kash/utils/api_utils/progress_protocol.py,sha256=Z_umf2DVmyTlfjiW57juN3wwlruU0camvVAHJKPHjtk,9041
|
|
203
206
|
kash/utils/common/__init__.py,sha256=ggeWw1xmbl1mgCQD3c4CNN2h5WXFCsN2wXlCWurEUEI,161
|
|
204
207
|
kash/utils/common/format_utils.py,sha256=83FhAwbMnOQIFudpnOGMuCqCiyoAlWGS6cc8q6xgZus,2072
|
|
205
|
-
kash/utils/common/function_inspect.py,sha256=
|
|
208
|
+
kash/utils/common/function_inspect.py,sha256=KE5QgIPx16iupCZrMlcvU6MuA5fUFboPEkqmltpFw3E,19824
|
|
206
209
|
kash/utils/common/import_utils.py,sha256=zyCa5sG_vTxzgIgjOS98xAwqkSeCQzN-8UkM6k9ZZOI,4615
|
|
207
210
|
kash/utils/common/lazyobject.py,sha256=9dmOfSheblOXgo2RRakMwgfPIKdTgtyrlm6dCKAze04,5157
|
|
208
211
|
kash/utils/common/obj_replace.py,sha256=AuiXptUOnuDNcWDgAJ3jEHkLh89XIqCP_SOkgaVyFIQ,2075
|
|
212
|
+
kash/utils/common/parse_docstring.py,sha256=oM1ecGGySRA3L_poddjReJ_qPY5506Le7E8_CDUrU8k,10922
|
|
209
213
|
kash/utils/common/parse_key_vals.py,sha256=yZRZIa5GD9SlnBSn2YNZm8PRVKoSJMY8DCmdGujQj_I,2418
|
|
210
214
|
kash/utils/common/parse_shell_args.py,sha256=UZXTZDbV5m5Jy39jdAQ6W8uilr1TNa0__RqnE8UmQ_M,10604
|
|
211
215
|
kash/utils/common/stack_traces.py,sha256=a2NwlK_0xxnjMCDC4LrQu7ueFylF-OImFG3bAAHpPwY,1392
|
|
212
216
|
kash/utils/common/task_stack.py,sha256=XkeBz3BwYY1HxxTqd3f7CulV0s61PePAKw1Irrtvf5o,4536
|
|
213
|
-
kash/utils/common/testing.py,sha256=
|
|
217
|
+
kash/utils/common/testing.py,sha256=9at6m_2YwRYitQoo-KeGsd2aoA59YUPs-x7cKcmy1C4,1802
|
|
214
218
|
kash/utils/common/type_utils.py,sha256=SJirXhPilQom_-OKkFToDLm_82ZwpjcNjRy8U1HaQ0Q,3829
|
|
215
219
|
kash/utils/common/uniquifier.py,sha256=75OY4KIVF8u1eoO0FCPbEGTyVpPOtM-0ctoG_s_jahM,3082
|
|
216
220
|
kash/utils/common/url.py,sha256=R_P-CkOUiFxVdo9COcaL7YFvFIoAULj5-XxvmlFLvzo,9416
|
|
@@ -231,12 +235,13 @@ kash/utils/lang_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
231
235
|
kash/utils/lang_utils/capitalization.py,sha256=5XbqBvjkzlxsm1Ue5AQP3P1J1IG0PubMVmGnoKVTF-c,3903
|
|
232
236
|
kash/utils/rich_custom/__init__.py,sha256=_g2F3Bqc1UnLTdAdCwkvzXmW7OvmqXrA8DpfT1dKy6w,75
|
|
233
237
|
kash/utils/rich_custom/ansi_cell_len.py,sha256=oQlNrqWB0f6pmigkbRRyeK6oWlGHMPbV_YLO_qmDH5E,2356
|
|
238
|
+
kash/utils/rich_custom/multitask_status.py,sha256=9K8jA_WCskb2-S3WZOgGQo19qkWYpX4WqB2RF1p1apE,21540
|
|
234
239
|
kash/utils/rich_custom/rich_char_transform.py,sha256=3M89tViKM0y31VHsDoHi5eHFWlv5ME7F4p35IdDxnrw,2616
|
|
235
240
|
kash/utils/rich_custom/rich_indent.py,sha256=nz72yNpUuYjOsaPNVmxM81oEQm-GKEfQkNsuWmv16G0,2286
|
|
236
241
|
kash/utils/rich_custom/rich_markdown_fork.py,sha256=M_JRaSAyHrSg-wuLv9C9P7SkehSim3lwkqQPuMIFkVw,26551
|
|
237
242
|
kash/utils/text_handling/doc_normalization.py,sha256=C211eSof8PUDVCqQtShuC4AMJpTZeBK8GHlGATp3c9E,2976
|
|
238
|
-
kash/utils/text_handling/escape_html_tags.py,sha256=
|
|
239
|
-
kash/utils/text_handling/markdown_render.py,sha256=
|
|
243
|
+
kash/utils/text_handling/escape_html_tags.py,sha256=8pC3JgoKRtdnbnOu8DiWrlvNR6GAqjwhGbQgl3jiFG4,6441
|
|
244
|
+
kash/utils/text_handling/markdown_render.py,sha256=LHPdJc__2ejBx7iwkp_P9wIePNmiVSgwu4-uhamVjms,3791
|
|
240
245
|
kash/utils/text_handling/markdown_utils.py,sha256=kB_zqqwBX7AHfxWqPsTCD2xpvW49z47Vs-Jet107woc,25561
|
|
241
246
|
kash/utils/text_handling/markdownify_utils.py,sha256=xNMlBX36BJ5VK5kxY2Ofo-Q84R2kBSM91u1grkQ-5As,2925
|
|
242
247
|
kash/utils/text_handling/unified_diffs.py,sha256=JfHSakISkT_GuBPBI4fTooHrp2aenWzDKiVvDewVfMk,2655
|
|
@@ -245,16 +250,16 @@ kash/web_content/dir_store.py,sha256=BJc-s-RL5CC-GwhFTC_lhLXSMWluPPnLVmVBx-66DiM
|
|
|
245
250
|
kash/web_content/file_cache_utils.py,sha256=JRXUCAmrc83iAgdiICU2EYGWcoORflWNl6GAVq-O80I,5529
|
|
246
251
|
kash/web_content/file_processing.py,sha256=cQC-MnJMM5qG9-y0S4yobkmRi6A75qhHjV6xTwbtYDY,1904
|
|
247
252
|
kash/web_content/local_file_cache.py,sha256=PEDKU5VIwhCnSC-HXG4EkO2OzrOUDuuDBMuo3lP2EN0,9466
|
|
248
|
-
kash/web_content/web_extract.py,sha256=
|
|
253
|
+
kash/web_content/web_extract.py,sha256=FLn4LPAQHe79kx9LhSbGNnvoDM59X-AqeyBMkyLdyZo,2847
|
|
249
254
|
kash/web_content/web_extract_justext.py,sha256=74HLJBKDGKatwxyRDX6za70bZG9LrVmtj9jLX7UJzg4,2540
|
|
250
255
|
kash/web_content/web_extract_readabilipy.py,sha256=IT7ET5IoU2-Nf37-Neh6CkKMvLL3WTNVJjq7ZMOx6OM,808
|
|
251
256
|
kash/web_content/web_fetch.py,sha256=J8DLFP1vzp7aScanFq0Bd7xCP6AVL4JgMMBqyRPtZjQ,4720
|
|
252
|
-
kash/web_content/web_page_model.py,sha256=
|
|
257
|
+
kash/web_content/web_page_model.py,sha256=aPpgC1fH2z2LTzGJhEDvZgq_mYwgsQIZaDS3UE7v98w,1147
|
|
253
258
|
kash/web_gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
254
259
|
kash/web_gen/simple_webpage.py,sha256=ks_0ljxCeS2-gAAEaUc1JEnzY3JY0nzqGFiyyqyRuZs,1537
|
|
255
260
|
kash/web_gen/tabbed_webpage.py,sha256=DiZV48TVvcjOf31g3nzTAtGKpH5Cek1Unksr7Cwcwog,4949
|
|
256
261
|
kash/web_gen/template_render.py,sha256=aypo6UanouftV4RpxgNm6JdquelI52fV0IlihdA3yjE,1908
|
|
257
|
-
kash/web_gen/templates/base_styles.css.jinja,sha256=
|
|
262
|
+
kash/web_gen/templates/base_styles.css.jinja,sha256=kLFEntQ7SHkbG9BEJTLtsiJCP5ldflILMXHAZGKjaF0,14942
|
|
258
263
|
kash/web_gen/templates/base_webpage.html.jinja,sha256=gwxXMSC_eY-stu8uT5AVyQJ-Ppy2GyWwq9vEdTEbVi0,12887
|
|
259
264
|
kash/web_gen/templates/content_styles.css.jinja,sha256=qwMKnjDRdjXxNfUgSrZEAkliHSLZ9OMsWGulonp-1Zs,3764
|
|
260
265
|
kash/web_gen/templates/explain_view.html.jinja,sha256=DNw5Iw5SrhIUFRGB4qNvfcKXsBHVbEJVURGdhvyC75Q,949
|
|
@@ -262,9 +267,9 @@ kash/web_gen/templates/item_view.html.jinja,sha256=cYGyGKFcX8-5L2SM7-BC5oK6GLuH6
|
|
|
262
267
|
kash/web_gen/templates/simple_webpage.html.jinja,sha256=I5O_z3BLo0p1HTghK2S1kUJBtvY-nSAIbJiapUns408,2576
|
|
263
268
|
kash/web_gen/templates/tabbed_webpage.html.jinja,sha256=umkipUXW-lDGnbV-tlDroCfCx_385PFnpbzsvwmityo,1843
|
|
264
269
|
kash/web_gen/templates/components/toc_scripts.js.jinja,sha256=9AanLJaVormGi52h-k2tKJTRT4BiBGGNnw3Kmrnr40Q,10481
|
|
265
|
-
kash/web_gen/templates/components/toc_styles.css.jinja,sha256=
|
|
266
|
-
kash/web_gen/templates/components/tooltip_scripts.js.jinja,sha256=
|
|
267
|
-
kash/web_gen/templates/components/tooltip_styles.css.jinja,sha256=
|
|
270
|
+
kash/web_gen/templates/components/toc_styles.css.jinja,sha256=Rd8P7nFTscex8iYrZbYRogxA9Yl4w0iI9_7q--3NyqY,6991
|
|
271
|
+
kash/web_gen/templates/components/tooltip_scripts.js.jinja,sha256=iz_5L5X4D4D1guotJjGVxMh5LcyOpjepw1R3nQd1NLE,32084
|
|
272
|
+
kash/web_gen/templates/components/tooltip_styles.css.jinja,sha256=o0qUwpe6--TyFjkfOZDMcL-ytk3jy3fob-mn6uQQOlw,14144
|
|
268
273
|
kash/workspaces/__init__.py,sha256=q1gFERRZLJMA9-XSUKvB1ulauHDKqyzzc86GFLbxAuk,700
|
|
269
274
|
kash/workspaces/param_state.py,sha256=vT_eGWqg2SRviIM5jqEAauznX2B5Xt2nHHu2oRxTcIU,746
|
|
270
275
|
kash/workspaces/selections.py,sha256=rEUuQlrQ3C_54bzBSKDTTptgX8oZPqN0Ao4uaXSWA-Q,12003
|
|
@@ -286,8 +291,8 @@ kash/xonsh_custom/xonsh_modern_tools.py,sha256=mj_b34LZXfE8MJe9EpDmp5JZ0tDM1biYN
|
|
|
286
291
|
kash/xonsh_custom/xonsh_ranking_completer.py,sha256=ZRGiAfoEgqgnlq2-ReUVEaX5oOgW1DQ9WxIv2OJLuTo,5620
|
|
287
292
|
kash/xontrib/fnm.py,sha256=V2tsOdmIDgbFbZSfMLpsvDIwwJJqiYnOkOySD1cXNXw,3700
|
|
288
293
|
kash/xontrib/kash_extension.py,sha256=FLIMlgR3C_6A1fwKE-Ul0nmmpJSszVPbAriinUyQ8Zg,1896
|
|
289
|
-
kash_shell-0.3.
|
|
290
|
-
kash_shell-0.3.
|
|
291
|
-
kash_shell-0.3.
|
|
292
|
-
kash_shell-0.3.
|
|
293
|
-
kash_shell-0.3.
|
|
294
|
+
kash_shell-0.3.21.dist-info/METADATA,sha256=T3OtawnUMP_E6_s0IstCPv4m8zYrdJiztDK8uDIPP2k,32656
|
|
295
|
+
kash_shell-0.3.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
296
|
+
kash_shell-0.3.21.dist-info/entry_points.txt,sha256=SQraWDAo8SqYpthLXThei0mf_hGGyhYBUO-Er_0HcwI,85
|
|
297
|
+
kash_shell-0.3.21.dist-info/licenses/LICENSE,sha256=rCh2PsfYeiU6FK_0wb58kHGm_Fj5c43fdcHEexiVzIo,34562
|
|
298
|
+
kash_shell-0.3.21.dist-info/RECORD,,
|
kash/help/docstring_utils.py
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
from dataclasses import field
|
|
2
|
-
from textwrap import dedent
|
|
3
|
-
|
|
4
|
-
from pydantic.dataclasses import dataclass
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@dataclass
|
|
8
|
-
class Docstring:
|
|
9
|
-
body: str = ""
|
|
10
|
-
param: dict[str, str] = field(default_factory=dict)
|
|
11
|
-
type: dict[str, str] = field(default_factory=dict)
|
|
12
|
-
returns: str = ""
|
|
13
|
-
rtype: str = ""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def parse_docstring(docstring: str) -> Docstring:
|
|
17
|
-
"""
|
|
18
|
-
Parse a reStructuredText-style docstring.
|
|
19
|
-
"""
|
|
20
|
-
# TODO: Support other standard docstring formats too.
|
|
21
|
-
docstring = dedent(docstring).strip()
|
|
22
|
-
|
|
23
|
-
lines = docstring.split("\n")
|
|
24
|
-
|
|
25
|
-
result = Docstring()
|
|
26
|
-
body_lines = []
|
|
27
|
-
|
|
28
|
-
for line in lines:
|
|
29
|
-
if line.strip().startswith(":"):
|
|
30
|
-
break
|
|
31
|
-
body_lines.append(line)
|
|
32
|
-
|
|
33
|
-
result.body = "\n".join(body_lines).strip()
|
|
34
|
-
|
|
35
|
-
parse_fields(lines[len(body_lines) :], result)
|
|
36
|
-
|
|
37
|
-
return result
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def parse_fields(lines: list[str], result: Docstring):
|
|
41
|
-
current_field = None
|
|
42
|
-
current_content = []
|
|
43
|
-
|
|
44
|
-
def save_current_field():
|
|
45
|
-
if current_field and current_content:
|
|
46
|
-
content = " ".join(current_content).strip()
|
|
47
|
-
if current_field.startswith("param "):
|
|
48
|
-
result.param[current_field[6:]] = content
|
|
49
|
-
elif current_field.startswith("type "):
|
|
50
|
-
result.type[current_field[5:]] = content
|
|
51
|
-
elif current_field == "return":
|
|
52
|
-
result.returns = content
|
|
53
|
-
elif current_field == "rtype":
|
|
54
|
-
result.rtype = content
|
|
55
|
-
|
|
56
|
-
for line in lines:
|
|
57
|
-
if line.strip().startswith(":"):
|
|
58
|
-
save_current_field()
|
|
59
|
-
current_field, _, content = line.strip()[1:].partition(":")
|
|
60
|
-
current_content = [content.strip()]
|
|
61
|
-
else:
|
|
62
|
-
current_content.append(line.strip())
|
|
63
|
-
|
|
64
|
-
save_current_field()
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## Tests
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
def test_parse_docstring():
|
|
71
|
-
docstring1 = """
|
|
72
|
-
Search for a string in files at the given paths and return their store paths.
|
|
73
|
-
Useful to find all docs or resources matching a string or regex.
|
|
74
|
-
|
|
75
|
-
:param sort: How to sort results. Can be `path` or `score`.
|
|
76
|
-
:param ignore_case: Ignore case when searching.
|
|
77
|
-
:type sort: str
|
|
78
|
-
:type ignore_case: bool
|
|
79
|
-
:return: The search results.
|
|
80
|
-
:rtype: CommandOutput
|
|
81
|
-
"""
|
|
82
|
-
|
|
83
|
-
parsed1 = parse_docstring(docstring1)
|
|
84
|
-
|
|
85
|
-
print(f"Body: {parsed1.body}")
|
|
86
|
-
print(f"Params: {parsed1.param}")
|
|
87
|
-
print(f"Types: {parsed1.type}")
|
|
88
|
-
print(f"Returns: {parsed1.returns}")
|
|
89
|
-
print(f"Return type: {parsed1.rtype}")
|
|
90
|
-
|
|
91
|
-
assert (
|
|
92
|
-
parsed1.body
|
|
93
|
-
== "Search for a string in files at the given paths and return their store paths.\nUseful to find all docs or resources matching a string or regex."
|
|
94
|
-
)
|
|
95
|
-
assert parsed1.param == {
|
|
96
|
-
"sort": "How to sort results. Can be `path` or `score`.",
|
|
97
|
-
"ignore_case": "Ignore case when searching.",
|
|
98
|
-
}
|
|
99
|
-
assert parsed1.type == {"sort": "str", "ignore_case": "bool"}
|
|
100
|
-
assert parsed1.returns == "The search results."
|
|
101
|
-
assert parsed1.rtype == "CommandOutput"
|
|
102
|
-
|
|
103
|
-
docstring2 = """Some text."""
|
|
104
|
-
|
|
105
|
-
parsed2 = parse_docstring(docstring2)
|
|
106
|
-
|
|
107
|
-
assert parsed2.body == "Some text."
|
|
108
|
-
assert parsed2.param == {}
|
|
109
|
-
assert parsed2.type == {}
|
|
110
|
-
assert parsed2.returns == ""
|
|
111
|
-
assert parsed2.rtype == ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|