mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
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:
parent
cd484d5d9b
commit
30e903e2ba
1 changed files with 1 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue