Skip to content

Commit a13141e

Browse files
authored
update allowed_qualifiers typing (#213)
* update allowed_qualifiers typing * use older typing.Set * apply isort * add changelog entry
1 parent 04b755c commit a13141e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
Unreleased
5+
----------
6+
7+
- Fix type hint for ``BasePurlType.allowed_qualifiers``
8+
https://github.com/package-url/packageurl-python/pull/213
9+
410
0.17.6 (2025-11-24)
511
-------------------
612

src/packageurl/validate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
Validate each type according to the PURL spec type definitions
2727
"""
2828

29+
from typing import Set
30+
2931

3032
class BasePurlType:
3133
"""
@@ -50,7 +52,7 @@ class BasePurlType:
5052
namespace_requirement: str
5153
""""States if this namespace is required, optional, or prohibited."""
5254

53-
allowed_qualifiers: dict = {"repository_url", "arch"}
55+
allowed_qualifiers: Set[str] = {"repository_url", "arch"}
5456
"""Set of allowed qualifier keys for this PURL type."""
5557

5658
namespace_case_sensitive: bool = True

0 commit comments

Comments
 (0)