Skip to content

Commit ab73709

Browse files
fleizeanclaude
andcommitted
refactor(pypi): drop the comments on the README repository lookup
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent d74b4f2 commit ab73709

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎src/backend/PkgDiff.Infrastructure/Services/PyPIService.cs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ private static bool IsGitHubUrl(string? url)
167167
?? RepositoryFromDescription(info);
168168
}
169169

170-
// Some packages link only their website (selenium: www.selenium.dev) and name the repository in the
171-
// README alone. Only a repository named after the package counts there: READMEs link other projects too.
172170
private static string? RepositoryFromDescription(PyPIPackageInfo info)
173171
{
174172
if (string.IsNullOrEmpty(info.Description) || string.IsNullOrEmpty(info.Name))
@@ -182,7 +180,6 @@ private static bool IsGitHubUrl(string? url)
182180
.FirstOrDefault(url => url != null && NormalizeName(url[(url.LastIndexOf('/') + 1)..]) == name);
183181
}
184182

185-
// PEP 503: names compare case-insensitively with runs of "-", "_" and "." as one "-"
186183
private static string NormalizeName(string name) =>
187184
System.Text.RegularExpressions.Regex.Replace(name, @"[-_.]+", "-").ToLowerInvariant();
188185

0 commit comments

Comments
 (0)