File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,13 +152,17 @@ def parse_version_constraint(
152152 warnings .append (
153153 'the = operator is not real, and will be treated as an exact version'
154154 )
155- for component in [
156- part .first_component or '' ,
157- part .second_component or '' ,
158- part .third_component or '' ,
159- ]:
160- if len (component ) > 1 and component .startswith ('0' ):
161- warnings .append ('components should not be prefixed with leading zeros' )
155+ warnings .extend (
156+ [
157+ 'components should not be prefixed with leading zeros'
158+ for component in [
159+ part .first_component or '' ,
160+ part .second_component or '' ,
161+ part .third_component or '' ,
162+ ]
163+ if len (component ) > 1 and component .startswith ('0' )
164+ ]
165+ )
162166
163167 # https://getcomposer.org/doc/articles/versions.md#wildcard-version-range-
164168 if parts [0 ].second_component == '*' or parts [0 ].third_component == '*' :
You can’t perform that action at this time.
0 commit comments