kopipasta 0.6.0__py3-none-any.whl → 0.8.0__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.
Potentially problematic release.
This version of kopipasta might be problematic. Click here for more details.
- kopipasta/main.py +11 -3
- {kopipasta-0.6.0.dist-info → kopipasta-0.8.0.dist-info}/METADATA +1 -1
- kopipasta-0.8.0.dist-info/RECORD +8 -0
- kopipasta-0.6.0.dist-info/RECORD +0 -8
- {kopipasta-0.6.0.dist-info → kopipasta-0.8.0.dist-info}/LICENSE +0 -0
- {kopipasta-0.6.0.dist-info → kopipasta-0.8.0.dist-info}/WHEEL +0 -0
- {kopipasta-0.6.0.dist-info → kopipasta-0.8.0.dist-info}/entry_points.txt +0 -0
- {kopipasta-0.6.0.dist-info → kopipasta-0.8.0.dist-info}/top_level.txt +0 -0
kopipasta/main.py
CHANGED
|
@@ -374,11 +374,14 @@ def select_file_patches(file_path):
|
|
|
374
374
|
break
|
|
375
375
|
elif choice == 'n':
|
|
376
376
|
placeholder = get_placeholder_comment(language)
|
|
377
|
-
chunks
|
|
377
|
+
if chunks and chunks[-1] != placeholder:
|
|
378
|
+
chunks.append(placeholder)
|
|
378
379
|
total_char_count += len(placeholder)
|
|
379
380
|
break
|
|
380
381
|
elif choice == 'q':
|
|
381
382
|
print("Skipping the rest of the file.")
|
|
383
|
+
if chunks and chunks[-1] != placeholder:
|
|
384
|
+
chunks.append(placeholder)
|
|
382
385
|
return chunks, total_char_count
|
|
383
386
|
else:
|
|
384
387
|
print("Invalid choice. Please enter 'y', 'n', or 'q'.")
|
|
@@ -516,8 +519,13 @@ def process_directory(directory, ignore_patterns, current_char_count=0):
|
|
|
516
519
|
continue
|
|
517
520
|
|
|
518
521
|
selected_files, current_char_count = select_files_in_directory(root, ignore_patterns, current_char_count)
|
|
519
|
-
|
|
520
|
-
|
|
522
|
+
for file_tuple in selected_files:
|
|
523
|
+
if len(file_tuple) == 3:
|
|
524
|
+
f, use_snippet, chunks = file_tuple
|
|
525
|
+
files_to_include.append((os.path.join(root, f), use_snippet, chunks))
|
|
526
|
+
else:
|
|
527
|
+
f, use_snippet = file_tuple
|
|
528
|
+
files_to_include.append((os.path.join(root, f), use_snippet))
|
|
521
529
|
processed_dirs.add(root)
|
|
522
530
|
|
|
523
531
|
return files_to_include, processed_dirs, current_char_count
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
kopipasta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
kopipasta/main.py,sha256=ldvknpIw_PMWdwxTOui_3sd2OR0XEvN6gjwJtejr8VY,28038
|
|
3
|
+
kopipasta-0.8.0.dist-info/LICENSE,sha256=xw4C9TAU7LFu4r_MwSbky90uzkzNtRwAo3c51IWR8lk,1091
|
|
4
|
+
kopipasta-0.8.0.dist-info/METADATA,sha256=uDtR8cTLlP6SY-i305eG0iTCAUZMnVJLSrlYXoViSy8,5431
|
|
5
|
+
kopipasta-0.8.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
6
|
+
kopipasta-0.8.0.dist-info/entry_points.txt,sha256=but54qDNz1-F8fVvGstq_QID5tHjczP7bO7rWLFkc6Y,50
|
|
7
|
+
kopipasta-0.8.0.dist-info/top_level.txt,sha256=iXohixMuCdw8UjGDUp0ouICLYBDrx207sgZIJ9lxn0o,10
|
|
8
|
+
kopipasta-0.8.0.dist-info/RECORD,,
|
kopipasta-0.6.0.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
kopipasta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
kopipasta/main.py,sha256=OmS54IQo4mJLUu_t6RYrEuLuJlFmnN9lEoZbZya3m-A,27657
|
|
3
|
-
kopipasta-0.6.0.dist-info/LICENSE,sha256=xw4C9TAU7LFu4r_MwSbky90uzkzNtRwAo3c51IWR8lk,1091
|
|
4
|
-
kopipasta-0.6.0.dist-info/METADATA,sha256=F3sWcMABaUy5hT0RWuZwpCkIsvhMNxLya8mhV6nXcFs,5431
|
|
5
|
-
kopipasta-0.6.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
6
|
-
kopipasta-0.6.0.dist-info/entry_points.txt,sha256=but54qDNz1-F8fVvGstq_QID5tHjczP7bO7rWLFkc6Y,50
|
|
7
|
-
kopipasta-0.6.0.dist-info/top_level.txt,sha256=iXohixMuCdw8UjGDUp0ouICLYBDrx207sgZIJ9lxn0o,10
|
|
8
|
-
kopipasta-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|