File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,7 @@ def from_install_requirement(cls, ireq: InstallRequirement) -> Self:
83
83
dist = ireq .get_dist ()
84
84
download_info = ireq .download_info
85
85
assert download_info
86
- package = cls (
87
- name = dist .canonical_name ,
88
- version = str (dist .version ),
89
- )
86
+ package = cls (name = dist .canonical_name )
90
87
package .direct = ireq .is_direct if ireq .is_direct else None
91
88
if package .direct :
92
89
if isinstance (download_info .info , VcsInfo ):
@@ -119,6 +116,7 @@ def from_install_requirement(cls, ireq: InstallRequirement) -> Self:
119
116
# should never happen
120
117
raise NotImplementedError ()
121
118
else :
119
+ package .version = str (dist .version )
122
120
if isinstance (download_info .info , ArchiveInfo ):
123
121
if not download_info .info .hashes :
124
122
raise NotImplementedError ()
You can’t perform that action at this time.
0 commit comments