example_name
stringlengths
10
28
python_file
stringlengths
9
32
python_code
stringlengths
490
18.2k
rust_code
stringlengths
0
434
has_rust
bool
2 classes
category
stringlengths
2
20
python_lines
int32
13
586
rust_lines
int32
0
6
blocking_features
listlengths
0
7
suspiciousness
float32
0
0.95
error
stringlengths
33
500
example_abs
abs_tool.py
#!/usr/bin/env python3 """Abs Example - Absolute value operations CLI. Examples: >>> compute_abs_int(-5) 5 >>> compute_abs_int(5) 5 >>> compute_abs_float(-3.14) 3.14 >>> compute_abs_float(2.71) 2.71 """ import argparse def compute_abs_int(x: int) -> int: """Compute absolute value...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_abs/abs_tool.py (1236 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_abs/abs_tool.rs (2536 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_abs/Cargo.toml (1 dependencies) ⏱️ Parse time: 48ms 📊 Thro...
true
abs
65
6
[]
0
null
example_abs
test_abs_tool.py
"""Tests for abs_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "abs_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_int_positive(): r = run("int...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_abs/test_abs_tool.py (747 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_abs/test_abs_tool.rs (2077 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_abs/Cargo.toml (2 dependencies) ⏱️ Parse time: 49m...
true
abs
38
6
[]
0
null
example_age_calculator
age_cli.py
#!/usr/bin/env python3 """Age calculator CLI. Calculate age and related date information. """ import argparse import sys from datetime import date, datetime def parse_date(date_str: str) -> date | None: """Parse date string into date object.""" formats = [ "%Y-%m-%d", "%d/%m/%Y", "%m...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/age_cli.py (6645 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/age_cli.rs (14113 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/Cargo.toml (4 dependenci...
true
age_calculator
241
6
[ "exception_handling" ]
0.577
null
example_age_calculator
test_age_cli.py
"""Tests for age_cli.py""" from datetime import date from age_cli import ( calculate_age, day_of_week, days_in_month, days_until_birthday, format_age, is_leap_year, next_birthday, parse_date, total_days, zodiac_sign, ) class TestParseDate: def test_iso_format(self): ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/test_age_cli.py (4878 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/test_age_cli.rs (10133 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_age_calculator/Cargo.toml (1 ...
true
age_calculator
181
6
[ "class_definition" ]
0.612
null
example_any_all
any_all_tool.py
#!/usr/bin/env python3 """Any All Example - Any/all operations CLI. Examples: >>> check_any(0, 0, 1, 0) True >>> check_all(1, 1, 1, 1) True """ import argparse def check_any(a: int, b: int, c: int, d: int) -> bool: """Check if any value is truthy. >>> check_any(0, 0, 0, 0) False >>>...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_any_all/any_all_tool.py (1498 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_any_all/any_all_tool.rs (2238 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_any_all/Cargo.toml (1 dependencies) ⏱️ Pars...
true
any_all
63
6
[]
0
null
example_any_all
test_any_all_tool.py
"""Tests for any_all_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "any_all_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_any_true(): r = run(...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_any_all/test_any_all_tool.py (757 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_any_all/test_any_all_tool.rs (2083 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_any_all/Cargo.toml (2 dependencies)...
true
any_all
38
6
[]
0
null
example_argparse_minimal
minimal_cli.py
#!/usr/bin/env python3 """ Minimal Argparse CLI - Baseline example that must compile This is the absolute minimum argparse example: - Single positional argument - Single optional argument - No subcommands - Minimal handler Purpose: Baseline CLI that depyler must handle correctly. """ import argparse def main(): ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_argparse_minimal/minimal_cli.py (942 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_argparse_minimal/minimal_cli.rs (582 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_argparse_minimal/Cargo.toml (1...
true
argparse_minimal
48
6
[ "context_manager" ]
0.652
null
example_argparse_minimal
test_minimal_cli.py
""" Test suite for minimal_cli.py Baseline CLI that must work with depyler Following extreme TDD methodology. """ import subprocess from pathlib import Path import pytest SCRIPT = Path(__file__).parent / "minimal_cli.py" def run_cli(*args): """Helper to run CLI and capture output.""" result = subprocess.r...
false
argparse_minimal
138
0
[ "context_manager", "class_definition", "stdin_usage", "decorator" ]
0.652
Performance Warnings ══════════════════════════════════════════════════ [1] [Medium] Large value 'args' passed by copy Location: run_cli, line 0 Impact: Complexity: O(n), Scales: Yes, Hot path: No Why: Passing large values by copy is inefficient Fix: Consider passing by reference (&) or using Box/Arc for ...
example_array
array_tool.py
#!/usr/bin/env python3 """Array Example - Aggregate operations CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="Array operations tool") subs = parser.add_subparsers(dest="cmd", required=True) s = subs.add_parser("sum") s.add_argument("a", type=int) s.add_argument...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_array/array_tool.py (718 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_array/array_tool.rs (1043 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_array/Cargo.toml (1 dependencies) ⏱️ Parse time: 48m...
true
array
29
6
[]
0
null
example_array
test_array_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for array CLI.""" import subprocess SCRIPT = "array_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestSum: def test_sum(self): r = run(["sum", "1", "2", "3"]); assert r.re...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_array/test_array_tool.py (566 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_array/test_array_tool.rs (2004 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 11.1 KB/s ⏱️ Total time: 49ms
true
array
15
5
[ "class_definition" ]
0.612
null
example_ascii
ascii_tool.py
#!/usr/bin/env python3 """Ascii Example - ASCII operations CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="ASCII operations tool") subs = parser.add_subparsers(dest="cmd", required=True) u = subs.add_parser("upper") u.add_argument("code", type=int) lo = subs.add...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_ascii/ascii_tool.py (695 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_ascii/ascii_tool.rs (1046 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_ascii/Cargo.toml (1 dependencies) ⏱️ Parse time: 49m...
true
ascii
28
6
[]
0
null
example_ascii
test_ascii_tool.py
"""Tests for ascii_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "ascii_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_upper(): r = run("upper ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_ascii/test_ascii_tool.py (605 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_ascii/test_ascii_tool.rs (1813 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_ascii/Cargo.toml (2 dependencies) ⏱️ Parse...
true
ascii
32
6
[]
0
null
example_async_basic
async_basic_cli.py
#!/usr/bin/env python3 """Async Basic CLI. Basic async/await patterns and coroutine functions. """ import argparse import asyncio import sys async def async_identity(value: int) -> int: """Simple async identity function.""" return value async def async_add(a: int, b: int) -> int: """Async addition."""...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_async_basic/async_basic_cli.py (6186 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_async_basic/async_basic_cli.rs (11954 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_async_basic/Cargo.toml (1 dep...
true
async_basic
241
6
[ "async_await", "context_manager", "exception_handling", "functools" ]
0.946
null
example_async_basic
test_async_basic_cli.py
"""Tests for async_basic_cli.py""" import pytest from async_basic_cli import ( async_add, async_all_positive, async_any_match, async_chain, async_conditional, async_count_matching, async_delay, async_early_return, async_factorial, async_fibonacci, async_filter_positive, ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_async_basic/test_async_basic_cli.py (5611 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_async_basic/test_async_basic_cli.rs (13097 bytes) ⏱️ Parse time: 51ms 📊 Throughput: 106.2 KB/s ⏱️ Total time: 51ms
true
async_basic
202
5
[ "context_manager", "class_definition", "functools" ]
0.652
null
example_async_context
async_context_cli.py
#!/usr/bin/env python3 """Async Context CLI. Async context managers and resource management patterns. """ import argparse import asyncio import sys from typing import Any class AsyncResource: """Simple async resource with enter/exit.""" def __init__(self, name: str) -> None: self._name: str = name ...
false
async_context
301
0
[ "async_await", "context_manager", "class_definition", "exception_handling", "multiprocessing" ]
0.946
Error: Unsupported type annotation: Constant(ExprConstant { range: 429..444, value: Str("AsyncResource"), kind: None })
example_async_context
test_async_context_cli.py
"""Tests for async_context_cli.py""" import pytest from async_context_cli import ( AsyncLock, AsyncPool, AsyncResource, AsyncTransaction, PooledConnection, nested_resources, pool_operations, resource_with_error, run_async, scoped_lock_operations, sequential_resources, tr...
false
async_context
231
0
[ "async_await", "context_manager", "class_definition", "exception_handling", "multiprocessing" ]
0.946
Error: Statement type not yet supported: AsyncFunctionDef
example_async_gather
async_gather_cli.py
#!/usr/bin/env python3 """Async Gather CLI. Concurrent async execution patterns with asyncio.gather. """ import argparse import asyncio import sys async def async_delay_value(value: int, delay_ms: int) -> int: """Return value after delay.""" await asyncio.sleep(delay_ms / 1000.0) return value async de...
false
async_gather
263
0
[ "async_await", "context_manager", "exception_handling", "multiprocessing", "functools" ]
0.946
Error: Statement type not yet supported: AsyncFunctionDef
example_async_gather
test_async_gather_cli.py
"""Tests for async_gather_cli.py""" import pytest from async_gather_cli import ( async_compute, async_delay_value, async_may_fail, batch_process, concurrent_all_positive, concurrent_filter_compute, concurrent_find_any, concurrent_map, fan_out_fan_in, gather_all, gather_all_c...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_async_gather/test_async_gather_cli.py (4298 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_async_gather/test_async_gather_cli.rs (10181 bytes) ⏱️ Parse time: 51ms 📊 Throughput: 82.2 KB/s ⏱️ Total time: 51ms
true
async_gather
162
5
[ "context_manager", "class_definition", "multiprocessing" ]
0.652
null
example_async_iterator
async_iterator_cli.py
#!/usr/bin/env python3 """Async Iterator CLI. Async iterators and async generators. """ import argparse import asyncio import sys from collections.abc import AsyncIterator class AsyncRange: """Async range iterator.""" def __init__(self, start: int, end: int, step: int = 1) -> None: self._start: int...
false
async_iterator
306
0
[ "async_await", "generator", "context_manager", "class_definition", "exception_handling" ]
0.946
Error: Statement type not yet supported: AsyncFor
example_async_iterator
test_async_iterator_cli.py
"""Tests for async_iterator_cli.py""" from async_iterator_cli import ( AsyncCounter, AsyncRange, all_positive_async, any_async, async_generator_chain, async_generator_enumerate, async_generator_fibonacci, async_generator_filter, async_generator_map, async_generator_range, as...
false
async_iterator
256
0
[ "async_await", "generator", "class_definition" ]
0.946
Error: Statement type not yet supported: AsyncFunctionDef
example_async_queue
async_queue_cli.py
#!/usr/bin/env python3 """Async Queue CLI. Async queue patterns for producer-consumer scenarios. """ import argparse import asyncio import sys from typing import Generic, TypeVar T = TypeVar("T") class AsyncQueue(Generic[T]): """Simple async queue implementation.""" def __init__(self, maxsize: int = 0) ->...
false
async_queue
369
0
[ "async_await", "lambda", "class_definition", "exception_handling" ]
0.946
Type inference hints: Hint: int for variable 'count' [Medium] (usage patterns suggest this type) Type inference hints: Hint: list[Any] for variable 'results' [High] (usage patterns suggest this type) Type inference hints: Hint: int for variable 'processed' [Medium] (usage patterns suggest this type) Hint: int for var...
example_async_queue
test_async_queue_cli.py
"""Tests for async_queue_cli.py""" from async_queue_cli import ( AsyncChannel, AsyncQueue, accumulator_pattern, batch_collector, bounded_queue_test, dedup_queue, filter_pipeline, priority_queue_simulation, producer, round_robin_queues, run_async, simple_producer_consumer...
false
async_queue
225
0
[ "async_await", "class_definition", "exception_handling" ]
0.946
Error: Statement type not yet supported: AsyncFunctionDef
example_backup_tool
backup_cli.py
#!/usr/bin/env python3 """Simple backup tool CLI. Create and restore file backups with timestamps. """ import argparse import hashlib import os import shutil import sys from datetime import datetime def get_timestamp() -> str: """Get current timestamp for backup naming.""" return datetime.now().strftime("%Y...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_backup_tool/backup_cli.py (7237 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_backup_tool/backup_cli.rs (13411 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_backup_tool/Cargo.toml (5 dependencies)...
true
backup_tool
232
6
[ "lambda", "context_manager", "exception_handling", "walrus_operator" ]
0.85
null
example_backup_tool
test_backup_cli.py
"""Tests for backup_cli.py""" import os import tempfile import time import pytest from backup_cli import ( backup_file, get_file_checksum, get_latest_backup, get_timestamp, list_backups, parse_timestamp, prune_backups, restore_backup, ) @pytest.fixture def temp_env(): """Create t...
false
backup_tool
209
0
[ "generator", "context_manager", "class_definition", "decorator" ]
0.927
Type inference hints: Hint: str for variable 'source' [Medium] (usage patterns suggest this type) Profiling Report ══════════════════════════════════════════════════ Summary Total estimated instructions: 1 Total estimated allocations: 0 Functions analyzed: 1 Hot Paths [1] temp_env (100.0% of execution time)...
example_base64
encode_tool.py
#!/usr/bin/env python3 """Base64 Example - Encoding/decoding CLI.""" import argparse import base64 import sys def cmd_encode(args): """Base64 encode. Depyler: proven to terminate""" data = sys.stdin.read().strip() encoded = base64.b64encode(data.encode()).decode() print(encoded) def cmd_decode(args...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_base64/encode_tool.py (1231 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_base64/encode_tool.rs (2467 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_base64/Cargo.toml (2 dependencies) ⏱️ Parse tim...
true
base64
48
6
[ "stdin_usage" ]
0.566
null
example_base64
test_encode_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for base64 CLI.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "encode_tool.py" SCRIPT = "encode_tool.py" def run(args, input_text=None): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_base64/test_encode_tool.py (1152 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_base64/test_encode_tool.rs (2705 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_base64/Cargo.toml (2 dependencies) ⏱️ ...
true
base64
39
6
[ "class_definition" ]
0.612
null
example_batch_processor
batch_cli.py
#!/usr/bin/env python3 """Batch processor CLI. Process items in batches with progress tracking. """ import argparse import json import sys import time from dataclasses import dataclass @dataclass class BatchResult: """Result of processing a batch.""" batch_index: int items_processed: int items_fail...
false
batch_processor
279
0
[ "context_manager", "class_definition", "stdin_usage", "decorator", "multiprocessing" ]
0.652
Type inference hints: Hint: int for variable 'failed' [Medium] (usage patterns suggest this type) Hint: int for variable 'processed' [Medium] (usage patterns suggest this type) Hint: list[Any] for variable 'errors' [High] (usage patterns suggest this type) Type inference hints: Hint: list[Any] for variable 'items' [Hi...
example_batch_processor
test_batch_cli.py
"""Tests for batch_cli.py""" import time from batch_cli import ( ProcessingStats, chunk_list, format_progress, generate_items, process_all, process_batch, process_item_dummy, ) class TestChunkList: def test_even_split(self): items = list(range(10)) chunks = chunk_list...
false
batch_processor
205
0
[ "class_definition", "multiprocessing" ]
0.612
Error: Expression type not yet supported: GeneratorExp { element: Binary { op: Eq, left: Call { func: "len", args: [Var("c")], kwargs: [] }, right: Literal(Int(1)) }, generators: [HirComprehension { target: "c", iter: Var("chunks"), conditions: [] }] }
example_bencode_codec
bencode_cli.py
#!/usr/bin/env python3 """Bencode codec CLI. Encode and decode BitTorrent bencode format. """ import argparse import json import sys def encode_int(value: int) -> bytes: """Encode integer to bencode.""" return f"i{value}e".encode("ascii") def encode_bytes(value: bytes) -> bytes: """Encode bytes to ben...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bencode_codec/bencode_cli.py (6564 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bencode_codec/bencode_cli.rs (13992 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bencode_codec/Cargo.toml (3 depen...
true
bencode_codec
238
6
[ "context_manager", "class_definition", "exception_handling", "stdin_usage", "multiprocessing" ]
0.652
null
example_bencode_codec
test_bencode_cli.py
"""Tests for bencode_cli.py""" from bencode_cli import ( bencode_decode, bencode_encode, encode_bytes, encode_dict, encode_int, encode_list, encode_string, validate_bencode, ) class TestEncodeInt: def test_positive(self): assert encode_int(42) == b"i42e" def test_zero...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bencode_codec/test_bencode_cli.py (3848 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bencode_codec/test_bencode_cli.rs (8640 bytes) ⏱️ Parse time: 51ms 📊 Throughput: 73.1 KB/s ⏱️ Total time: 51ms
true
bencode_codec
149
5
[ "class_definition" ]
0.612
null
example_bin
bin_tool.py
#!/usr/bin/env python3 """Bin Example - Binary operations CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="Binary operations tool") subs = parser.add_subparsers(dest="cmd", required=True) t = subs.add_parser("tobin") t.add_argument("num", type=int) f = subs.add_p...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bin/bin_tool.py (801 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bin/bin_tool.rs (2624 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bin/Cargo.toml (1 dependencies) ⏱️ Parse time: 48ms 📊 Throu...
true
bin
33
6
[]
0
null
example_bin
test_bin_tool.py
"""Tests for bin_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "bin_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_tobin(): r = run("tobin 10")...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bin/test_bin_tool.py (610 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bin/test_bin_tool.rs (1820 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bin/Cargo.toml (2 dependencies) ⏱️ Parse time: 47m...
true
bin
32
6
[]
0
null
example_binary_codec
binary_codec_cli.py
#!/usr/bin/env python3 """Binary Codec CLI. Binary encoding/decoding utilities (base64, hex, etc). """ import argparse import base64 import sys def encode_hex(data: bytes) -> str: """Encode bytes to hex string.""" return data.hex() def decode_hex(hex_str: str) -> bytes: """Decode hex string to bytes."...
false
binary_codec
357
0
[ "context_manager", "exception_handling" ]
0.652
Type inference hints: Hint: str for variable 'bin_str' [Medium] (usage patterns suggest this type) Type inference hints: Hint: str for variable 'b' [Medium] (usage patterns suggest this type) Hint: list[Any] for variable 'result' [High] (usage patterns suggest this type) Type inference hints: Hint: str for variable '...
example_binary_codec
test_binary_codec_cli.py
"""Tests for binary_codec_cli.py""" from binary_codec_cli import ( binary_string_to_bytes, bit_reverse_bytes, bytes_to_binary_string, bytes_to_int_list, caesar_cipher, caesar_decipher, calculate_crc8, calculate_crc16, decode_ascii_hex, decode_base16, decode_base32, decod...
false
binary_codec
284
0
[ "class_definition" ]
0.612
thread 'main' (2445357) panicked at crates/depyler-core/src/direct_rules.rs:1763:28: expected identifier, found keyword `_` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
example_binary_search
search_cli.py
#!/usr/bin/env python3 """Binary search CLI. Binary search implementations with various comparators. """ import argparse import sys from collections.abc import Callable def binary_search(arr: list, target, key: Callable | None = None) -> int: """Basic binary search. Returns index or -1 if not found.""" left...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_binary_search/search_cli.py (6365 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_binary_search/search_cli.rs (16559 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_binary_search/Cargo.toml (3 depende...
true
binary_search
249
6
[ "context_manager", "stdin_usage" ]
0.652
null
example_binary_search
test_search_cli.py
"""Tests for search_cli.py""" from search_cli import ( binary_search, binary_search_left, binary_search_right, count_occurrences, find_peak, find_range, search_ceil, search_closest, search_floor, search_rotated, ) class TestBinarySearch: def test_found(self): arr =...
false
binary_search
206
0
[ "class_definition" ]
0.612
Error: Expression type not yet supported: IfExpr { test: Binary { op: Gt, left: Var("idx"), right: Literal(Int(0)) }, body: Binary { op: GtEq, left: Index { base: Var("arr"), index: Var("idx") }, right: Index { base: Var("arr"), index: Binary { op: Sub, left: Var("idx"), right: Literal(Int(1)) } } }, orelse: Literal(Bo...
example_bisect
bisect_tool.py
#!/usr/bin/env python3 """Bisect Example - Binary search CLI.""" import argparse import bisect def main(): parser = argparse.ArgumentParser(description="Binary search tool") subs = parser.add_subparsers(dest="cmd", required=True) lp = subs.add_parser("left") lp.add_argument("x", type=int) r = s...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bisect/bisect_tool.py (650 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bisect/bisect_tool.rs (1706 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bisect/Cargo.toml (1 dependencies) ⏱️ Parse time...
true
bisect
27
6
[]
0
null
example_bisect
test_bisect_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for bisect CLI.""" import subprocess SCRIPT = "bisect_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestBisect: def test_left(self): r = run(["left", "5"]); assert r.retur...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bisect/test_bisect_tool.py (528 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bisect/test_bisect_tool.rs (1702 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 10.3 KB/s ⏱️ Total time: 50ms
true
bisect
13
5
[ "class_definition" ]
0.612
null
example_bitwise_ops
bitwise_ops_cli.py
#!/usr/bin/env python3 """Bitwise Operations CLI. Bitwise operations and bit manipulation patterns. """ import argparse import sys def bit_and(a: int, b: int) -> int: """Bitwise AND.""" return a & b def bit_or(a: int, b: int) -> int: """Bitwise OR.""" return a | b def bit_xor(a: int, b: int) -> ...
false
bitwise_ops
312
0
[ "context_manager" ]
0.652
Type inference hints: Hint: int for variable 'count' [Medium] (usage patterns suggest this type) Type inference hints: Hint: int for variable 'count' [Medium] (usage patterns suggest this type) Hint: int for variable 'value' [Medium] (usage patterns suggest this type) Type inference hints: Hint: int for variable 'val...
example_bitwise_ops
test_bitwise_ops_cli.py
"""Tests for bitwise_ops_cli.py""" from bitwise_ops_cli import ( bit_and, bit_not, bit_or, bit_xor, check_bit, clear_bit, count_set_bits, count_set_bits_fast, deinterleave_bits, extract_bits, from_binary_string, gray_decode, gray_encode, highest_set_bit, inse...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bitwise_ops/test_bitwise_ops_cli.py (7199 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bitwise_ops/test_bitwise_ops_cli.rs (17235 bytes) ⏱️ Parse time: 52ms 📊 Throughput: 134.4 KB/s ⏱️ Total time: 52ms
true
bitwise_ops
264
5
[ "context_manager", "class_definition" ]
0.652
null
example_bool
bool_tool.py
#!/usr/bin/env python3 """Bool Example - Boolean operations CLI. Examples: >>> bool_and(1, 1) True >>> bool_or(0, 1) True >>> bool_not(0) True """ import argparse def bool_and(x: int, y: int) -> bool: """Logical AND of two integers as booleans. >>> bool_and(1, 1) True >>> bo...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bool/bool_tool.py (1566 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bool/bool_tool.rs (2582 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bool/Cargo.toml (1 dependencies) ⏱️ Parse time: 49ms 📊...
true
bool
78
6
[]
0
null
example_bool
test_bool_tool.py
"""Tests for bool_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "bool_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_and(): r = run("and 1 1") ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_bool/test_bool_tool.py (599 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_bool/test_bool_tool.rs (1808 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_bool/Cargo.toml (2 dependencies) ⏱️ Parse time...
true
bool
32
6
[]
0
null
example_byte_buffer
byte_buffer_cli.py
#!/usr/bin/env python3 """Byte Buffer CLI. Growable byte buffer operations with read/write cursor. """ import argparse import struct import sys class ByteBuffer: """A growable byte buffer with read/write cursor.""" def __init__(self, capacity: int = 256) -> None: self._data: bytearray = bytearray(c...
false
byte_buffer
310
0
[ "context_manager", "class_definition", "exception_handling", "decorator" ]
0.652
Error: Unsupported type annotation: Constant(ExprConstant { range: 548..560, value: Str("ByteBuffer"), kind: None })
example_byte_buffer
test_byte_buffer_cli.py
"""Tests for byte_buffer_cli.py""" import pytest from byte_buffer_cli import ( ByteBuffer, buffer_from_hex, create_buffer, read_message, read_varint, read_varints, write_message, write_varint, write_varints, ) class TestByteBufferBasic: def test_create(self): buf = Byt...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_byte_buffer/test_byte_buffer_cli.py (6874 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_byte_buffer/test_byte_buffer_cli.rs (11594 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 136.6 KB/s ⏱️ Total time: 49ms
true
byte_buffer
264
5
[ "context_manager", "class_definition" ]
0.652
null
example_calc_parser
calc_cli.py
#!/usr/bin/env python3 """Calculator Parser CLI. Recursive descent parser for arithmetic expressions. """ import argparse import math import sys from dataclasses import dataclass from enum import Enum, auto class TokenType(Enum): """Token types for the calculator.""" NUMBER = auto() PLUS = auto() M...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_calc_parser/calc_cli.py (10573 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_calc_parser/calc_cli.rs (16382 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_calc_parser/Cargo.toml (3 dependencies) ⏱️...
true
calc_parser
370
6
[ "class_definition", "exception_handling", "stdin_usage", "decorator" ]
0.612
null
example_calc_parser
test_calc_cli.py
"""Tests for calc_cli.py""" import math import pytest from calc_cli import ( Lexer, TokenType, evaluate, tokenize, ) class TestLexer: def test_number(self): lexer = Lexer("42") token = lexer.next_token() assert token.type == TokenType.NUMBER assert token.value == ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_calc_parser/test_calc_cli.py (6053 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_calc_parser/test_calc_cli.rs (11250 bytes) ⏱️ Parse time: 54ms 📊 Throughput: 108.2 KB/s ⏱️ Total time: 54ms
true
calc_parser
224
5
[ "context_manager", "class_definition", "decorator" ]
0.652
null
example_calendar
cal_tool.py
#!/usr/bin/env python3 """Calendar Example - Calendar CLI.""" import argparse import calendar def cmd_month(args): """Show month calendar. Depyler: proven to terminate""" print(calendar.month(args.year, args.month)) def cmd_year(args): """Show year calendar. Depyler: proven to terminate""" print(ca...
false
calendar
52
0
[]
0
Error: Unsupported function call type: Subscript(ExprSubscript { range: 1367..1461, value: Dict(ExprDict { range: 1367..1447, keys: [Some(Constant(ExprConstant { range: 1368..1375, value: Str("month"), kind: None })), Some(Constant(ExprConstant { range: 1388..1394, value: Str("year"), kind: None })), Some(Constant(Expr...
example_calendar
test_cal_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for calendar CLI.""" import subprocess SCRIPT = "cal_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestMonth: def test_month(self): result = run(["month", "2024", ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_calendar/test_cal_tool.py (1067 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_calendar/test_cal_tool.rs (2894 bytes) ⏱️ Parse time: 50ms 📊 Throughput: 20.5 KB/s ⏱️ Total time: 51ms
true
calendar
34
5
[ "class_definition" ]
0.612
null
example_callback_pattern
callback_pattern_cli.py
#!/usr/bin/env python3 """Callback Pattern CLI. Callback and handler function patterns. """ import argparse import sys from collections.abc import Callable # Event types EventHandler = Callable[[str, dict[str, object]], None] DataProcessor = Callable[[list[int]], list[int]] Validator = Callable[[object], bool] Error...
false
callback_pattern
315
0
[ "lambda", "context_manager", "class_definition", "exception_handling", "multiprocessing", "functools" ]
0.783
Error: Unsupported type annotation: Constant(ExprConstant { range: 1739..1753, value: Str("DataPipeline"), kind: None })
example_callback_pattern
test_callback_pattern_cli.py
"""Tests for callback_pattern_cli.py""" import pytest from callback_pattern_cli import ( DataPipeline, EventEmitter, FormValidator, async_like, create_filter_callback, create_length_validator, create_logger_callback, create_map_callback, create_range_validator, map_with_callback...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_callback_pattern/test_callback_pattern_cli.py (8039 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_callback_pattern/test_callback_pattern_cli.rs (15530 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example...
true
callback_pattern
267
6
[ "lambda", "context_manager", "class_definition", "exception_handling", "functools" ]
0.783
null
example_choices
choice_validator.py
#!/usr/bin/env python3 """ Choices Validation Example Demonstrates: - choices parameter for string validation - choices with integer types - Default values with choices - Help text showing valid choices This validates depyler's ability to transpile choices to Rust (clap value_parser with PossibleValues). """ import ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_choices/choice_validator.py (1553 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_choices/choice_validator.rs (1066 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_choices/Cargo.toml (1 dependencies) ...
true
choices
69
6
[ "context_manager" ]
0.652
null
example_choices
test_choice_validator.py
#!/usr/bin/env python3 """EXTREME TDD: Tests written FIRST for choices validation.""" import subprocess SCRIPT = "choice_validator.py" def run(args: list[str]) -> subprocess.CompletedProcess: return subprocess.run( ["python3", SCRIPT] + args, capture_output=True, text=True, cwd=_...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_choices/test_choice_validator.py (3167 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_choices/test_choice_validator.rs (5820 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_choices/Cargo.toml (2 depe...
true
choices
107
6
[ "context_manager", "class_definition", "multiprocessing" ]
0.652
null
example_closure_capture
closure_capture_cli.py
#!/usr/bin/env python3 """Closure Capture CLI. Closures capturing outer variables patterns. """ import argparse import sys from collections.abc import Callable def make_adder(n: int) -> Callable[[int], int]: """Create function that adds n.""" def adder(x: int) -> int: return x + n return adder...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_closure_capture/closure_capture_cli.py (7349 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_closure_capture/closure_capture_cli.rs (10993 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_closure_captu...
true
closure_capture
306
6
[ "context_manager" ]
0.652
null
example_closure_capture
test_closure_capture_cli.py
"""Tests for closure_capture_cli.py""" from closure_capture_cli import ( apply_n_times, compose, make_accumulator, make_adder, make_bounded_counter, make_cache, make_comparator, make_counter, make_default_factory, make_multiplier, make_once, make_power, make_prefix_f...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_closure_capture/test_closure_capture_cli.py (6935 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_closure_capture/test_closure_capture_cli.rs (15389 bytes) ⏱️ Parse time: 56ms 📊 Throughput: 119.7 KB/s ⏱️ Total time: 56ms
true
closure_capture
285
5
[ "lambda", "class_definition" ]
0.783
null
example_cmath
cmath_tool.py
#!/usr/bin/env python3 """Cmath Example - Complex math CLI.""" import argparse import math def main(): parser = argparse.ArgumentParser(description="Complex math tool") subs = parser.add_subparsers(dest="cmd", required=True) a = subs.add_parser("abs") a.add_argument("real", type=float) a.add_arg...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_cmath/cmath_tool.py (997 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_cmath/cmath_tool.rs (1373 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_cmath/Cargo.toml (1 dependencies) ⏱️ Parse time: 50m...
true
cmath
34
6
[]
0
null
example_cmath
test_cmath_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for cmath CLI.""" import subprocess SCRIPT = "cmath_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestCmath: def test_abs(self): r = run(["abs", "3", "4"]); assert r.retur...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_cmath/test_cmath_tool.py (614 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_cmath/test_cmath_tool.rs (1886 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 12.1 KB/s ⏱️ Total time: 49ms
true
cmath
14
5
[ "class_definition" ]
0.612
null
example_colorsys
color_tool.py
#!/usr/bin/env python3 """Colorsys Example - Color conversion CLI.""" import argparse import colorsys def cmd_rgb2hsv(args): """RGB to HSV. Depyler: proven to terminate""" r, g, b = args.r / 255, args.g / 255, args.b / 255 h, s, v = colorsys.rgb_to_hsv(r, g, b) print(f"HSV: {h:.3f}, {s:.3f}, {v:.3f}"...
false
colorsys
59
0
[]
0
Error: Unsupported function call type: Subscript(ExprSubscript { range: 1638..1754, value: Dict(ExprDict { range: 1638..1726, keys: [Some(Constant(ExprConstant { range: 1639..1648, value: Str("rgb2hsv"), kind: None })), Some(Constant(ExprConstant { range: 1663..1672, value: Str("hsv2rgb"), kind: None })), Some(Constant...
example_colorsys
test_color_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for colorsys CLI.""" import subprocess SCRIPT = "color_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestRgbToHsv: def test_red(self): result = run(["rgb2hsv", "25...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_colorsys/test_color_tool.py (1003 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_colorsys/test_color_tool.rs (2864 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 19.6 KB/s ⏱️ Total time: 50ms
true
colorsys
33
5
[ "class_definition" ]
0.612
null
example_complex
complex_cli.py
#!/usr/bin/env python3 """ Complex CLI example demonstrating advanced argparse features. This example showcases: - Mutually exclusive groups (--json, --xml, --yaml) - Argument groups (input, output, processing) - Custom types and validation (port, positive int, email) - File I/O arguments - Environment variable fallba...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_complex/complex_cli.py (4866 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_complex/complex_cli.rs (6386 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_complex/Cargo.toml (2 dependencies) ⏱️ Parse ...
true
complex
187
6
[ "context_manager", "exception_handling", "decorator" ]
0.652
null
example_complex
test_complex_cli.py
#!/usr/bin/env python3 """ Comprehensive test suite for complex_cli.py (example_complex). This test suite follows the extreme TDD approach with 100% coverage goals. Tests are written BEFORE implementation (RED phase). Features Tested: 1. Mutually exclusive groups (--json, --xml, --yaml output formats) 2. Argument gro...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_complex/test_complex_cli.py (14363 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_complex/test_complex_cli.rs (21681 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_complex/Cargo.toml (2 dependencies...
true
complex
356
6
[ "context_manager", "class_definition", "decorator", "multiprocessing" ]
0.652
null
example_config
config_manager.py
#!/usr/bin/env python3 """ Config File Example - Configuration management Demonstrates: - Reading/writing JSON config files - Merging CLI args with config file defaults - Subcommands for config operations (get, set, list, init) - File I/O operations - Nested dict handling This validates depyler's ability to transpile...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_config/config_manager.py (4099 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_config/config_manager.rs (6713 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_config/Cargo.toml (4 dependencies) ⏱️ Par...
true
config
151
6
[ "context_manager" ]
0.652
null
example_config
test_config_manager.py
#!/usr/bin/env python3 """ Tests for config_manager.py Comprehensive test coverage for configuration file management CLI. """ import json import subprocess from pathlib import Path import pytest SCRIPT = Path(__file__).parent / "config_manager.py" def run_cli(*args): """ Helper to run config_manager.py CL...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_config/test_config_manager.py (7454 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_config/test_config_manager.rs (10088 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_config/Cargo.toml (2 dependenci...
true
config
235
6
[ "context_manager", "class_definition", "decorator" ]
0.652
null
example_config_validator
config_cli.py
#!/usr/bin/env python3 """Configuration Validator CLI. Validate configuration dictionaries against rules. """ import argparse import json import sys from dataclasses import dataclass, field from enum import Enum, auto class RuleType(Enum): """Validation rule types.""" REQUIRED = auto() TYPE = auto() ...
false
config_validator
444
0
[ "context_manager", "class_definition", "decorator" ]
0.652
Error: Unsupported type annotation: Constant(ExprConstant { range: 946..959, value: Str("FieldSchema"), kind: None })
example_config_validator
test_config_cli.py
"""Tests for config_cli.py""" from config_cli import ( RuleType, ValueType, create_field, diff_configs, flatten_config, get_value_type, merge_configs, parse_schema_dict, parse_type, type_matches, unflatten_config, validate, validate_field, ) class TestGetValueType:...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_config_validator/test_config_cli.py (12020 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_config_validator/test_config_cli.rs (31023 bytes) ⏱️ Parse time: 60ms 📊 Throughput: 193.9 KB/s ⏱️ Total time: 60ms
true
config_validator
337
5
[ "class_definition" ]
0.612
null
example_configparser
config_tool.py
#!/usr/bin/env python3 """Config Example - Key-value parsing CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="Config parsing tool") subs = parser.add_subparsers(dest="cmd", required=True) k = subs.add_parser("key") k.add_argument("pair") v = subs.add_parser("valu...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_configparser/config_tool.py (732 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_configparser/config_tool.rs (1844 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_configparser/Cargo.toml (1 dependenci...
true
configparser
30
6
[]
0
null
example_configparser
test_config_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for config CLI.""" import subprocess SCRIPT = "config_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestConfig: def test_key(self): r = run(["key", "host=localhost"]); ass...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_configparser/test_config_tool.py (599 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_configparser/test_config_tool.rs (1861 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 11.8 KB/s ⏱️ Total time: 49ms
true
configparser
14
5
[ "class_definition" ]
0.612
null
example_context_error
context_error_cli.py
#!/usr/bin/env python3 """Context Error CLI. Context managers with error handling patterns. """ import argparse import sys from contextlib import contextmanager class Resource: """Simulated resource with cleanup.""" def __init__(self, name: str): self.name = name self.is_open = False ...
false
context_error
326
0
[ "generator", "context_manager", "class_definition", "exception_handling", "decorator" ]
0.927
Error: Unsupported type annotation: Constant(ExprConstant { range: 1280..1297, value: Str("ManagedResource"), kind: None })
example_context_error
test_context_error_cli.py
"""Tests for context_error_cli.py""" import pytest from context_error_cli import ( ManagedResource, Resource, SuppressingResource, TransactionResource, accumulate_with_transaction, context_cleanup_on_error, context_with_return, generator_context_test, managed_open, multiple_cont...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_context_error/test_context_error_cli.py (6629 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_context_error/test_context_error_cli.rs (16380 bytes) ⏱️ Parse time: 52ms 📊 Throughput: 124.1 KB/s ⏱️ Total time: 52ms
true
context_error
245
5
[ "context_manager", "class_definition", "exception_handling" ]
0.652
null
example_contextlib
resource_tool.py
#!/usr/bin/env python3 """ Contextlib Example - Resource management Demonstrates contextlib patterns for resource handling. """ import argparse import tempfile from contextlib import redirect_stdout def cmd_tempfile(args): """Create temp file. Depyler: proven to terminate""" with tempfile.NamedTemporaryFile...
false
contextlib
47
0
[ "context_manager" ]
0.652
Profiling Report ══════════════════════════════════════════════════ Summary Total estimated instructions: 48 Total estimated allocations: 0 Functions analyzed: 3 Hot Paths [1] cmd_redirect (25.0% of execution time) [2] main (72.9% of execution time) Function Metrics 🔥 main 72....
example_contextlib
test_resource_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for contextlib CLI.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "resource_tool.py" import os import tempfile SCRIPT = "resource_tool.py" def run(args: list[str]) -> subprocess.CompletedProcess: return subprocess.run(["python3", SCR...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_contextlib/test_resource_tool.py (1138 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_contextlib/test_resource_tool.rs (2800 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_contextlib/Cargo.toml (3 d...
true
contextlib
42
6
[ "context_manager", "class_definition", "exception_handling", "multiprocessing" ]
0.652
null
example_copy
copy_tool.py
#!/usr/bin/env python3 """Copy Example - Copy operations CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="Copy operations tool") subs = parser.add_subparsers(dest="cmd", required=True) s = subs.add_parser("shallow") s.add_argument("value") d = subs.add_parser("de...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_copy/copy_tool.py (760 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_copy/copy_tool.rs (1064 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_copy/Cargo.toml (1 dependencies) ⏱️ Parse time: 47ms 📊 ...
true
copy
32
6
[]
0
null
example_copy
test_copy_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for copy CLI.""" import subprocess SCRIPT = "copy_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestCopy: def test_shallow(self): r = run(["shallow", "hello"]); assert r.r...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_copy/test_copy_tool.py (654 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_copy/test_copy_tool.rs (1913 bytes) ⏱️ Parse time: 48ms 📊 Throughput: 13.2 KB/s ⏱️ Total time: 48ms
true
copy
14
5
[ "class_definition" ]
0.612
null
example_count
count_tool.py
#!/usr/bin/env python3 """Count Example - String count operations CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="String count tool") subs = parser.add_subparsers(dest="cmd", required=True) ch = subs.add_parser("char") ch.add_argument("text") ch.add_argument("ta...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_count/count_tool.py (1391 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_count/count_tool.rs (3847 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_count/Cargo.toml (1 dependencies) ⏱️ Parse time: 49...
true
count
51
6
[]
0
null
example_count
test_count_tool.py
"""Tests for count_tool - EXTREME TDD.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "count_tool.py" def run(cmd): return subprocess.run( ["python3", str(SCRIPT)] + cmd.split(), capture_output=True, text=True, ) def test_char(): r = run("char mi...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_count/test_count_tool.py (632 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_count/test_count_tool.rs (1840 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_count/Cargo.toml (2 dependencies) ⏱️ Parse...
true
count
32
6
[]
0
null
example_counter
test_word_counter.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for collections.Counter CLI.""" import subprocess SCRIPT = "word_counter.py" def run(args: list[str], input_text: str = None) -> subprocess.CompletedProcess: return subprocess.run( ["python3", SCRIPT] + args, capture_output=True, text=True, ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_counter/test_word_counter.py (1622 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_counter/test_word_counter.rs (3178 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_counter/Cargo.toml (2 dependencies...
true
counter
65
6
[ "class_definition", "multiprocessing" ]
0.612
null
example_counter
word_counter.py
#!/usr/bin/env python3 """ Counter Example - Word/character frequency CLI Demonstrates: - collections.Counter - most_common() - Counter arithmetic - stdin processing This validates depyler's ability to transpile Counter to Rust (HashMap with frequency counting). """ import argparse import sys from collections import...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_counter/word_counter.py (1832 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_counter/word_counter.rs (3156 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_counter/Cargo.toml (1 dependencies) ⏱️ Pars...
true
counter
70
6
[ "context_manager", "stdin_usage" ]
0.652
null
example_crc32_tool
crc32_cli.py
#!/usr/bin/env python3 """CRC32 checksum calculator CLI. Calculate and verify CRC32 checksums. """ import argparse import os import sys # CRC32 polynomial (IEEE 802.3) CRC32_POLY = 0xEDB88320 # Pre-computed CRC32 table CRC32_TABLE: list[int] = [] def init_crc32_table() -> None: """Initialize CRC32 lookup tabl...
false
crc32_tool
240
0
[ "context_manager", "exception_handling", "stdin_usage", "walrus_operator" ]
0.85
Error: Statement type not yet supported: Global
example_crc32_tool
test_crc32_cli.py
"""Tests for crc32_cli.py""" import os import tempfile from crc32_cli import ( crc32, crc32_file, crc32_update, format_crc32, generate_checksum_file, init_crc32_table, parse_checksum_file, parse_crc32, verify_checksum, verify_checksum_file, ) class TestCrc32: def test_emp...
false
crc32_tool
190
0
[ "context_manager", "class_definition", "exception_handling" ]
0.652
Error: join() requires exactly one argument
example_cron_validator
cron_cli.py
#!/usr/bin/env python3 """Cron expression validator CLI. Validate and explain cron expressions. """ import argparse import re import sys from datetime import datetime, timedelta FIELD_NAMES = ["minute", "hour", "day_of_month", "month", "day_of_week"] FIELD_RANGES = { "minute": (0, 59), "hour": (0, 23), "...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/cron_cli.py (8959 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/cron_cli.rs (16703 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/Cargo.toml (6 dependen...
true
cron_validator
324
6
[ "context_manager", "exception_handling" ]
0.652
null
example_cron_validator
test_cron_cli.py
"""Tests for cron_cli.py""" from datetime import datetime from cron_cli import ( explain_cron, matches_cron, next_run, parse_cron, parse_field, validate_cron, ) class TestParseField: def test_wildcard(self): result = parse_field("*", "minute") assert result == list(range(...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/test_cron_cli.py (4302 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/test_cron_cli.rs (7732 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_cron_validator/Cargo.toml (1...
true
cron_validator
157
6
[ "class_definition" ]
0.612
null
example_csv
csv_tool.py
#!/usr/bin/env python3 """CSV Example - CSV-like parsing CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="CSV operations tool") subs = parser.add_subparsers(dest="cmd", required=True) c = subs.add_parser("count") c.add_argument("row") f = subs.add_parser("field")...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv/csv_tool.py (650 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv/csv_tool.rs (1893 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_csv/Cargo.toml (1 dependencies) ⏱️ Parse time: 48ms 📊 Throu...
true
csv
27
6
[]
0
null
example_csv
test_csv_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for csv CLI.""" import subprocess SCRIPT = "csv_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestCsv: def test_count(self): r = run(["count", "a,b,c"]); assert "3" in r.s...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv/test_csv_tool.py (490 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv/test_csv_tool.rs (1678 bytes) ⏱️ Parse time: 48ms 📊 Throughput: 9.8 KB/s ⏱️ Total time: 48ms
true
csv
13
5
[ "class_definition" ]
0.612
null
example_csv_basic
csv_basic_cli.py
#!/usr/bin/env python3 """CSV Basic CLI. CSV reading and writing operations. """ import argparse import csv import io import sys def parse_csv(content: str, delimiter: str = ",") -> list[list[str]]: """Parse CSV string to list of rows.""" reader = csv.reader(io.StringIO(content), delimiter=delimiter) re...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/csv_basic_cli.py (8580 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/csv_basic_cli.rs (21337 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/Cargo.toml (2 dependencies)...
true
csv_basic
275
6
[ "lambda", "context_manager" ]
0.783
null
example_csv_basic
test_csv_basic_cli.py
"""Tests for csv_basic_cli.py""" import os import tempfile from csv_basic_cli import ( add_column, column_count, count_by_column, filter_dict_rows, filter_rows, get_column, get_column_by_name, get_headers, merge_csv, parse_csv, parse_csv_dict, read_csv_dict_file, re...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/test_csv_basic_cli.py (6302 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/test_csv_basic_cli.rs (21844 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_csv_basic/Cargo.toml (1 dep...
true
csv_basic
220
6
[ "context_manager", "class_definition", "exception_handling" ]
0.652
null
example_csv_dialect
csv_dialect_cli.py
#!/usr/bin/env python3 """CSV parser with custom dialect support. Supports custom delimiters, quote characters, and escape handling. """ import argparse import sys def parse_csv_line(line: str, delimiter: str, quote: str, escape: str) -> list: """Parse a single CSV line with custom dialect.""" fields = [] ...
false
csv_dialect
140
0
[ "context_manager", "stdin_usage" ]
0.652
Type inference hints: Hint: int for variable 'char' [Medium] (usage patterns suggest this type) Hint: int for variable 'i' [High] (usage patterns suggest this type) Hint: int for variable 'current' [Medium] (usage patterns suggest this type) Hint: list[Any] for variable 'line' [High] (usage patterns suggest this type) ...
example_csv_dialect
test_csv_dialect_cli.py
"""Tests for csv_dialect_cli.py""" from csv_dialect_cli import ( convert_delimiter, count_columns, format_csv_line, get_column, parse_csv_line, ) class TestParsing: def test_simple_csv(self): result = parse_csv_line("a,b,c", ",", '"', "") assert result == ["a", "b", "c"] ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv_dialect/test_csv_dialect_cli.py (2398 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv_dialect/test_csv_dialect_cli.rs (6202 bytes) ⏱️ Parse time: 49ms 📊 Throughput: 47.7 KB/s ⏱️ Total time: 49ms
true
csv_dialect
82
5
[ "class_definition" ]
0.612
null
example_csv_filter
csv_filter.py
#!/usr/bin/env python3 """ CSV Filter - Memory-efficient CSV filtering using generators Demonstrates: - Generator expressions for lazy evaluation - csv.DictReader iteration - Predicate filtering with lambda/functions - Streaming write to stdout or file - argparse for CLI options This validates depyler's ability to tr...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_csv_filter/csv_filter.py (3503 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_csv_filter/csv_filter.rs (4236 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_csv_filter/Cargo.toml (4 dependencies) ⏱️ ...
true
csv_filter
124
6
[ "context_manager", "exception_handling", "multiprocessing" ]
0.652
null
example_csv_filter
test_csv_filter.py
#!/usr/bin/env python3 """ Test suite for csv_filter - Memory-efficient CSV filtering Tests generator expressions, streaming I/O, and memory efficiency. Following EXTREME TDD methodology with 100% coverage goal. """ import csv import subprocess import sys from pathlib import Path import pytest # Test data fixtures...
false
csv_filter
373
0
[ "context_manager", "class_definition", "exception_handling", "stdin_usage", "decorator" ]
0.652
Type inference hints: Hint: list[Any] for return type [Medium] (explicit return) Type inference hints: Hint: str for return type [Medium] (explicit return) Hint: int for variable 'tmp_path' [Medium] (usage patterns suggest this type) Hint: str for variable 'csv_file' [Medium] (usage patterns suggest this type) Type i...
example_custom_exception
custom_exception_cli.py
#!/usr/bin/env python3 """Custom Exception CLI. Custom exception classes with inheritance patterns. """ import argparse import sys class AppError(Exception): """Base application error.""" def __init__(self, message: str, code: int = 0): super().__init__(message) self.message = message ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_custom_exception/custom_exception_cli.py (7923 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_custom_exception/custom_exception_cli.rs (15511 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_custom_ex...
true
custom_exception
268
6
[ "context_manager", "class_definition", "exception_handling", "decorator" ]
0.652
null
example_custom_exception
test_custom_exception_cli.py
"""Tests for custom_exception_cli.py""" import pytest from custom_exception_cli import ( AppError, AuthenticationError, AuthorizationError, NotFoundError, RateLimitError, ValidationError, authenticate, authorize_action, check_rate_limit, find_item, find_user, format_erro...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_custom_exception/test_custom_exception_cli.py (7868 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_custom_exception/test_custom_exception_cli.rs (20779 bytes) ⏱️ Parse time: 55ms 📊 Throughput: 139.1 KB/s ⏱️ Total time: 55ms
true
custom_exception
280
5
[ "context_manager", "class_definition", "decorator" ]
0.652
null
example_custom_types
custom_tool.py
#!/usr/bin/env python3 """Custom Types Example - Custom argument type CLI.""" import argparse def main(): parser = argparse.ArgumentParser(description="Custom types tool") subs = parser.add_subparsers(dest="cmd", required=True) p = subs.add_parser("port") p.add_argument("value", type=int) pc = s...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_custom_types/custom_tool.py (791 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_custom_types/custom_tool.rs (1675 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_custom_types/Cargo.toml (1 dependenci...
true
custom_types
29
6
[]
0
null
example_custom_types
test_custom_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for custom types CLI.""" import subprocess SCRIPT = "custom_tool.py" def run(args): return subprocess.run(["python3", SCRIPT] + args, capture_output=True, text=True, cwd=__file__.rsplit("/", 1)[0]) class TestCustomTypes: def test_port(self): r = run(["port", "8080"]); ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_custom_types/test_custom_tool.py (651 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_custom_types/test_custom_tool.rs (1909 bytes) ⏱️ Parse time: 47ms 📊 Throughput: 13.3 KB/s ⏱️ Total time: 48ms
true
custom_types
14
5
[ "class_definition" ]
0.612
null
example_dataclass
data_tool.py
#!/usr/bin/env python3 """ Dataclass Example - Structured data CLI Demonstrates: - @dataclass decorator - Type annotations - Default values - JSON serialization This validates depyler's ability to transpile dataclasses to Rust (struct with serde derive). """ import argparse import json from dataclasses import asdict...
false
dataclass
60
0
[ "context_manager", "class_definition", "decorator" ]
0.652
Profiling Report ══════════════════════════════════════════════════ Summary Total estimated instructions: 67 Total estimated allocations: 0 Functions analyzed: 2 Hot Paths [1] cmd_create (59.7% of execution time) [2] main (40.3% of execution time) Function Metrics 🔥 cmd_create 59.7%...
example_dataclass
test_data_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests for dataclass CLI.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "data_tool.py" import json SCRIPT = "data_tool.py" def run(args: list[str]) -> subprocess.CompletedProcess: return subprocess.run( ["python3", SCRIPT] + args, ...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_dataclass/test_data_tool.py (1638 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_dataclass/test_data_tool.rs (3656 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_dataclass/Cargo.toml (2 dependencies...
true
dataclass
63
6
[ "class_definition", "decorator", "multiprocessing" ]
0.612
null
example_datetime
test_time_tool.py
#!/usr/bin/env python3 """EXTREME TDD: Tests written FIRST for datetime operations.""" import subprocess from pathlib import Path SCRIPT = Path(__file__).parent / "time_tool.py" import re SCRIPT = "time_tool.py" def run(args: list[str]) -> subprocess.CompletedProcess: return subprocess.run( ["python3",...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_datetime/test_time_tool.py (2427 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_datetime/test_time_tool.rs (4282 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_datetime/Cargo.toml (2 dependencies) ⏱...
true
datetime
89
6
[ "class_definition", "multiprocessing" ]
0.612
null
example_datetime
time_tool.py
#!/usr/bin/env python3 """ Datetime Example - Time manipulation CLI Demonstrates: - datetime.now(), datetime.fromtimestamp() - strftime/strptime formatting - timedelta calculations - ISO format handling This validates depyler's ability to transpile datetime to Rust (chrono crate). """ import argparse from datetime i...
false
datetime
90
0
[]
0
Profiling Report ══════════════════════════════════════════════════ Summary Total estimated instructions: 141 Total estimated allocations: 0 Functions analyzed: 5 Hot Paths [1] main (33.3% of execution time) [2] cmd_duration (25.5% of execution time) [3] cmd_parse (12.8% of execution time) [4] cmd_now ...
example_datetime_basic
datetime_basic_cli.py
#!/usr/bin/env python3 """Datetime Basic CLI. Basic date and time operations. """ import argparse import sys from datetime import date, datetime, time, timezone def today() -> date: """Get today's date.""" return date.today() def now() -> datetime: """Get current datetime.""" return datetime.now()...
false
datetime_basic
388
0
[]
0
Type inference hints: Hint: str for variable 'd' [Medium] (usage patterns suggest this type) Type inference hints: Hint: str for variable 't' [Medium] (usage patterns suggest this type) Type inference hints: Hint: list[Any] for variable 'names' [High] (usage patterns suggest this type) Type inference hints: Hint: li...
example_datetime_basic
test_datetime_basic_cli.py
"""Tests for datetime_basic_cli.py""" from datetime import date, datetime from datetime_basic_cli import ( combine, compare_dates, create_date, create_datetime, create_time, ctime, date_to_datetime, datetime_date, datetime_time, days_in_month, days_in_year, from_isoform...
📄 Source: /home/noah/src/reprorusted-python-cli/examples/example_datetime_basic/test_datetime_basic_cli.py (8590 bytes) 📝 Output: /home/noah/src/reprorusted-python-cli/examples/example_datetime_basic/test_datetime_basic_cli.rs (23193 bytes) 📦 Cargo.toml: /home/noah/src/reprorusted-python-cli/examples/example_datetim...
true
datetime_basic
349
6
[ "class_definition" ]
0.612
null
example_datetime_calendar
datetime_calendar_cli.py
#!/usr/bin/env python3 """Datetime Calendar CLI. Calendar module operations. """ import argparse import calendar import sys from datetime import date def is_leap(year: int) -> bool: """Check if year is a leap year.""" return calendar.isleap(year) def leap_days(y1: int, y2: int) -> int: """Count leap y...
false
datetime_calendar
304
0
[]
0
Type inference hints: Hint: list[Any] for variable 'cal' [High] (usage patterns suggest this type) Type inference hints: Hint: int for variable 'n' [Medium] (usage patterns suggest this type) Hint: list[Any] for variable 'days' [High] (usage patterns suggest this type) Type inference hints: Hint: list[Any] for variab...
example_datetime_calendar
test_datetime_calendar_cli.py
"""Tests for datetime_calendar_cli.py""" from datetime import date from datetime_calendar_cli import ( all_day_names, all_month_names, business_days_in_month, count_weekdays_in_month, day_abbr, day_name, days_in_month, first_weekday_of_month, get_first_weekday, get_week, ht...
false
datetime_calendar
264
0
[ "class_definition" ]
0.612
Error: Expression type not yet supported: GeneratorExp { element: Call { func: "isinstance", args: [Var("d"), Var("date")], kwargs: [] }, generators: [HirComprehension { target: "d", iter: Var("dates"), conditions: [] }] }