File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,11 @@ def normalize_qualifiers(
226226
227227 if not encode :
228228 return qualifiers_map
229+ return _qualifier_map_to_string (qualifiers_map )
229230
230- qualifiers_list = [f"{ key } ={ value } " for key , value in qualifiers_map .items ()]
231+
232+ def _qualifier_map_to_string (qualifiers : dict [str , str ]) -> str :
233+ qualifiers_list = [f"{ key } ={ value } " for key , value in qualifiers .items ()]
231234 return "&" .join (qualifiers_list ) or None
232235
233236
@@ -425,12 +428,15 @@ def to_string(self, encode: bool | None = True) -> str:
425428
426429 if qualifiers :
427430 purl .append ("?" )
431+ if not encode :
432+ qualifiers = _qualifier_map_to_string (qualifiers )
428433 purl .append (qualifiers )
429434
430435 if subpath :
431436 purl .append ("#" )
432437 purl .append (subpath )
433438
439+ print (purl )
434440 return "" .join (purl )
435441
436442 @classmethod
You can’t perform that action at this time.
0 commit comments