cr-proc 0.1.1__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cr_proc
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: A tool for processing BYU CS code recording files
5
5
  Author: Ethan Dye
6
6
  Author-email: mrtops03@gmail.com
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cr_proc"
3
- version = "0.1.1"
3
+ version = "0.1.3"
4
4
  description = "A tool for processing BYU CS code recording files"
5
5
  authors = [
6
6
  {name = "Ethan Dye",email = "mrtops03@gmail.com"}
@@ -52,7 +52,7 @@ def _apply_event_fuzzy_text(doc: str, offset: int, old: str, new: str, window: i
52
52
  return _apply_event_exact_text(doc, best_pos, old, new)
53
53
 
54
54
  raise ValueError(
55
- f"Old fragment not found near offset {offset}. old={old!r}, new={new!r}"
55
+ f"Old fragment not found near offset {offset}.\nold={old!r}\nnew={new!r}"
56
56
  )
57
57
 
58
58
 
@@ -106,8 +106,8 @@ def _apply_event_fuzzy_utf16(doc_bytes: bytes, offset_units: int, old: str, new:
106
106
  return doc_bytes[:best_pos_b] + new_b + doc_bytes[best_pos_b + len(old_b):]
107
107
 
108
108
  raise ValueError(
109
- f"Old fragment not found near offset {offset_units} (UTF-16 units). "
110
- f"old={old!r}, new={new!r}"
109
+ f"Old fragment not found near offset {offset_units} (UTF-16 units).\n"
110
+ f"old={old!r}\nnew={new!r}"
111
111
  )
112
112
 
113
113
 
@@ -177,7 +177,7 @@ def _detect_multiline_external_pastes(jsonData: tuple[dict[str, Any], ...]) -> l
177
177
  "line_count": len(new_lines),
178
178
  "char_count": len(new_frag),
179
179
  "reason": "multi-line external paste",
180
- "newFragment": new_frag[:100] + ("..." if len(new_frag) > 100 else ""),
180
+ "newFragment": new_frag
181
181
  })
182
182
 
183
183
  # Update history after analysis so the current fragment cannot mask itself
@@ -152,7 +152,7 @@ def main():
152
152
  else:
153
153
  print(f" Event #{ev['event_index']} ({reason}): "
154
154
  f"{ev['line_count']} lines, {ev['char_count']} chars - "
155
- f"newFragment: {ev['newFragment']}", file=sys.stderr)
155
+ f"newFragment:\n```\n{ev['newFragment']}\n```", file=sys.stderr)
156
156
  else:
157
157
  print("Success! No suspicious events detected.", file=sys.stderr)
158
158
 
File without changes