Skip to content

Commit 9352fd6

Browse files
committed
Merge branch 'dev'
2 parents b31f68b + f8897c6 commit 9352fd6

File tree

101 files changed

+204
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+204
-206
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,4 @@ manifest.bak
191191
.master-planning
192192
output-shell.txt
193193
output-script.txt
194+
.cursor

bin/chunkfile.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,13 @@ def write_chunk(
169169
base = os.path.basename(name)
170170
out_file = f"{base}_{part_num:02}{ext}"
171171

172-
with open(out_file, "wb") as chunk_file:
172+
with open(out_file, "wb", encoding="utf-8") as chunk_file:
173173
if is_lines:
174174
# For line mode, join lines and remove trailing newline
175175
data = b"".join(chunk) # type: ignore
176-
chunk_file.write(data.rstrip(b"\n"))
177-
else:
176+
chunk_file.write(data.rstrip(b"\n").decode("utf-8"))
177+
else:
178+
with open(out_file, mode) as chunk_file:
178179
chunk_file.write(chunk) # type: ignore
179180
print(f"Created: {out_file}")
180181

@@ -213,11 +214,7 @@ def split_file(
213214
total = file_size + (num_chunks - 1) * overlap
214215
chunk_size = total // num_chunks
215216

216-
# Open file in text mode for line-based chunking, binary mode for byte-based
217-
open_mode = "rb" if chunk_size else "rb"
218-
open_kwargs = {"encoding": "utf-8"} if num_lines else {}
219-
220-
with open(input_file, open_mode, **open_kwargs) as file:
217+
with open(input_file, "rb", encoding="utf-8") as file:
221218
part_num = 1
222219
prev_overlap = b""
223220
prev_lines: List[bytes] = []

docs/shdoc/README.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/config_lib_sh.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/errno_lib_sh.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/functions/__set_venv_vars.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/functions/__venv_conda_check.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/functions/_deprecated.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/functions/_source_check.md

Lines changed: 1 addition & 1 deletion

docs/shdoc/bin/shinclude/functions/benv.md

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)