PythonToCSharpConverter.cs:36 -- 移除未使用的 indentLevel 变量

Program.test.cs -- 将顶层语句改为 ManualTest.RunAsync() 方法,消除入口点冲突
BatchConversionService.cs:96 -- options 可空参数添加 ?? new ConversionOptions() 空值回退
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
This commit is contained in:
monkeycode-ai
2026-06-16 17:06:24 +08:00
parent db536cfb2c
commit 2fcc22b501
3 changed files with 17 additions and 10 deletions
@@ -33,7 +33,6 @@ public class PythonToCSharpConverter : IConverter
sb.AppendLine();
var lines = pythonCode.Split('\n');
var indentLevel = 0;
foreach (var line in lines)
{
@@ -93,7 +93,7 @@ public class BatchConversionService : IBatchConversionService
var sourceCode = await File.ReadAllTextAsync(sourceFile, cancellationToken);
var conversionResult = await _conversionService.ConvertAsync(
sourceCode, sourceLanguage.ToName(), targetLanguage.ToName(), options);
sourceCode, sourceLanguage.ToName(), targetLanguage.ToName(), options ?? new ConversionOptions());
if (conversionResult.Success)
{