pep440: remove redundant without_local() (#2019)

In this context, we already know (as the comment says) that `self` does
not have a local segment, so we don't need to strip it.

This change isn't motivated by anything other than making the code and
comment in sync. For example, when I first looked at it, I wondered
whether the extra stripping was somehow necessary. But it isn't.
This commit is contained in:
Andrew Gallant 2024-02-27 11:00:58 -05:00 committed by GitHub
parent cd484d5d9b
commit 30e903e2ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -417,10 +417,7 @@ impl VersionSpecifier {
(self.version.clone(), version.clone())
} else {
// self is already without local
(
self.version.clone().without_local(),
version.clone().without_local(),
)
(self.version.clone(), version.clone().without_local())
};
match self.operator {