Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions StabilityMatrix.Core/Python/UvManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ public async Task<IReadOnlyList<UvPythonInfo>> ListAvailablePythonsAsync(

[GeneratedRegex(
@"^\s*(?<key>[a-zA-Z0-9_.-]+(?:[\+\-][a-zA-Z0-9_.-]+)?)\s+(?<status_or_path>.+)\s*$",
RegexOptions.IgnoreCase | RegexOptions.Compiled,
"en-US"
RegexOptions.IgnoreCase | RegexOptions.Compiled
)]
private static partial Regex UvListRegex();
Comment on lines 333 to 337
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This GeneratedRegex and the UvPythonListRegex field it's used for (line 42) appear to be unused. The ListAvailablePythonsAsync method now requests JSON output from uv and parses that, making this regex for plain text parsing obsolete.

To improve maintainability, consider removing this GeneratedRegex attribute and the UvListRegex method, the UvPythonListRegex field on line 42, and the related comments on lines 30-41.

}
Loading