fastcore 2.2.28__tar.gz → 2.2.29__tar.gz
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.
- {fastcore-2.2.28/fastcore.egg-info → fastcore-2.2.29}/PKG-INFO +1 -1
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/__init__.py +1 -1
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/editskill.py +1 -1
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/tools.py +5 -3
- {fastcore-2.2.28 → fastcore-2.2.29/fastcore.egg-info}/PKG-INFO +1 -1
- {fastcore-2.2.28 → fastcore-2.2.29}/CONTRIBUTING.md +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/LICENSE +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/README.md +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/_modidx.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/aio.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/all.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/ansi.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/apisurface.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/basics.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/dispatch.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/docments.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/docscrape.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/foundation.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/funccall.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/imghdr.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/imports.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/meta.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/nb_imports.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/nbio.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/net.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/parallel.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/py2pyi.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/script.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/shutil.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/style.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/test.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/transform.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/utils.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/xdg.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/xml.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore/xtras.py +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore.egg-info/SOURCES.txt +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore.egg-info/dependency_links.txt +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore.egg-info/entry_points.txt +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore.egg-info/requires.txt +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/fastcore.egg-info/top_level.txt +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/pyproject.toml +0 -0
- {fastcore-2.2.28 → fastcore-2.2.29}/setup.cfg +0 -0
|
@@ -50,7 +50,7 @@ Edits accept line numbers, lnhash addresses, or section tokens. Get addresses wh
|
|
|
50
50
|
|
|
51
51
|
Prefer lnhash addresses when `exhash` is installed. The editor checks the hash against current content and rejects stale addresses. Plain line numbers are unverified and can shift after an edit. Re-view after each plain-line-number edit and apply multiple edits from bottom to top. Read `exhash.skill` for address formats and verified editing.
|
|
52
52
|
|
|
53
|
-
Section tokens identify sections in document outlines. In `1.6.|12|
|
|
53
|
+
Section tokens identify sections in document outlines. In `1.6.|12|Py|,45|HD|`, `1.6.` is the section number. The rest is the lnhash range for its first and last lines. `d.at(token)` returns the section after checking its hash. `d.view(tok1, tok2)` prints the rendered text of both sections. Use the boundary range to edit the section: `file_exhash(path, ('12|Py|,45|HD|', 'c', new_text))`.
|
|
54
54
|
|
|
55
55
|
Read `exhash.skill` before working through large Markdown, code, or notebook files, or documentation from a URL. It describes `open_doc` tree searches and link following, including the llms.txt workflow.
|
|
56
56
|
|
|
@@ -4,7 +4,7 @@ The text editors take a string and return the edited text. Invalid edits raise `
|
|
|
4
4
|
|
|
5
5
|
Read `fastcore.editskill` for the editing toolkit's naming, parameter and workflow conventions. It exposes these tools alongside the notebook editors from `fastcore.nbio`.
|
|
6
6
|
|
|
7
|
-
`line_hash`, `lnhash` and `lnhash_at` create [exhash](https://answerdotai.github.io/exhash) addresses without depending on the exhash package. Addresses use `lineno|hash|`. The hash is the low
|
|
7
|
+
`line_hash`, `lnhash` and `lnhash_at` create [exhash](https://answerdotai.github.io/exhash) addresses without depending on the exhash package. Addresses use `lineno|hash|`. The hash is the low 12 bits of CRC32, encoded as two Base64url characters (`A–Z`, `a–z`, `0–9`, `-`, `_`), high six bits first.
|
|
8
8
|
|
|
9
9
|
File editors take the path first and return a unified diff. An unchanged result returns `none: No changes.` Invalid edits return `error: ...`.
|
|
10
10
|
|
|
@@ -152,8 +152,10 @@ def del_lines(
|
|
|
152
152
|
def line_hash(
|
|
153
153
|
line:str # Text to hash; when hashing a single line, omit its trailing newline
|
|
154
154
|
)->str:
|
|
155
|
-
"
|
|
156
|
-
|
|
155
|
+
"2-char Base64url hash of `line`"
|
|
156
|
+
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
|
|
157
|
+
h = zlib.crc32(line.encode())
|
|
158
|
+
return alphabet[(h>>6)&63] + alphabet[h&63]
|
|
157
159
|
|
|
158
160
|
def lnhash(
|
|
159
161
|
lineno:int, # 1-based line number
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|